MessageEncryptor
public class McElieceCipher extends java.lang.Object implements MessageEncryptor
Modifier and Type | Field | Description |
---|---|---|
int |
cipherTextSize |
|
int |
maxPlainTextSize |
|
static java.lang.String |
OID |
The OID of the algorithm.
|
Constructor | Description |
---|---|
McElieceCipher() |
Modifier and Type | Method | 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 MessageEncryptor
forEncryption
- 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 MessageEncryptor
input
- the plain textpublic byte[] messageDecrypt(byte[] input) throws InvalidCipherTextException
messageDecrypt
in interface MessageEncryptor
input
- the cipher textInvalidCipherTextException
- if the cipher text is invalid.