public class McElieceCipher extends java.lang.Object implements MessageEncryptor
| Modifier and Type | Field and Description |
|---|---|
int |
cipherTextSize |
int |
maxPlainTextSize |
static java.lang.String |
OID
The OID of the algorithm.
|
| Constructor and Description |
|---|
McElieceCipher() |
| Modifier and Type | Method and Description |
|---|---|
int |
getKeySize(McElieceKeyParameters key)
Return the key size of the given key object.
|
void |
init(boolean forEncryption,
CipherParameters param) |
byte[] |
messageDecrypt(byte[] input)
Decrypt a cipher text.
|
byte[] |
messageEncrypt(byte[] input)
Encrypt a plain text.
|
public static final java.lang.String OID
public int maxPlainTextSize
public int cipherTextSize
public void init(boolean forEncryption,
CipherParameters param)
init in interface MessageEncryptorforEncryption - true if we are encrypting a signature, false
otherwise.param - key parameters for encryption or decryption.public int getKeySize(McElieceKeyParameters key)
key - the McElieceKeyParameters objectpublic byte[] messageEncrypt(byte[] input)
messageEncrypt in interface MessageEncryptorinput - the plain textpublic byte[] messageDecrypt(byte[] input)
throws InvalidCipherTextException
messageDecrypt in interface MessageEncryptorinput - the cipher textInvalidCipherTextException - if the cipher text is invalid.