public class McElieceKobaraImaiCipher extends java.lang.Object implements MessageEncryptor
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
OID
The OID of the algorithm.
|
static byte[] |
PUBLIC_CONSTANT
A predetermined public constant.
|
| Constructor and Description |
|---|
McElieceKobaraImaiCipher() |
| Modifier and Type | Method and Description |
|---|---|
int |
getKeySize(McElieceCCA2KeyParameters key)
Return the key size of the given key object.
|
void |
init(boolean forSigning,
CipherParameters param) |
void |
initCipherDecrypt(McElieceCCA2PrivateKeyParameters privKey) |
byte[] |
messageDecrypt(byte[] input) |
byte[] |
messageEncrypt(byte[] input) |
public static final java.lang.String OID
public static final byte[] PUBLIC_CONSTANT
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(McElieceCCA2KeyParameters key)
key - the McElieceCCA2KeyParameters objectpublic void initCipherDecrypt(McElieceCCA2PrivateKeyParameters privKey)
public byte[] messageEncrypt(byte[] input)
throws java.lang.Exception
messageEncrypt in interface MessageEncryptorinput - the message to be signed.java.lang.Exceptionpublic byte[] messageDecrypt(byte[] input)
throws java.lang.Exception
messageDecrypt in interface MessageEncryptorinput - the cipher text of the messagejava.lang.Exception