public class McEliecePKCSCipher 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 |
|---|
McEliecePKCSCipher() |
| Modifier and Type | Method and Description |
|---|---|
int |
getKeySize(McElieceKeyParameters key)
Return the key size of the given key object.
|
void |
init(boolean forSigning,
CipherParameters param) |
void |
initCipherDecrypt(McEliecePrivateKeyParameters privKey) |
void |
initCipherEncrypt(McEliecePublicKeyParameters pubKey) |
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 forSigning,
CipherParameters param)
init in interface MessageEncryptorforSigning - 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 void initCipherEncrypt(McEliecePublicKeyParameters pubKey)
public void initCipherDecrypt(McEliecePrivateKeyParameters privKey)
public byte[] messageEncrypt(byte[] input)
messageEncrypt in interface MessageEncryptorinput - the plain textpublic byte[] messageDecrypt(byte[] input)
throws java.lang.Exception
messageDecrypt in interface MessageEncryptorinput - the cipher textjava.lang.Exception - if the cipher text is invalid.