public class JCECipher extends ProprietaryOrJCECipher
| Constructor and Description |
|---|
JCECipher(javax.crypto.Cipher cipher) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
decrypt(byte[] inputBytes)
decrypts the given byte stream
|
byte[] |
encrypt(byte[] bytes)
Encrypts the given byte stream
|
void |
generatePrivateAndPublicKey(ProprietaryOrJCECipherCallbackObject callbackObject)
Generates or obtains all the private stuff that the encryption protocol needs to do encryption/decryption.
|
java.lang.String |
getAlgorithm()
Gets The algorithm name
|
byte[] |
getPublishInfo()
Gets a byte array containing all the specific info needed to set up en-/decryption.
|
void |
setPublishedInfo(byte[] cipherInfo)
Sets all the specific info needed to set up en-/decryption.
|
public java.lang.String getAlgorithm()
ProprietaryOrJCECiphergetAlgorithm in class ProprietaryOrJCECipherpublic byte[] encrypt(byte[] bytes)
throws java.security.InvalidKeyException,
javax.crypto.IllegalBlockSizeException,
javax.crypto.BadPaddingException,
javax.crypto.BadPaddingException
ProprietaryOrJCECipherencrypt in class ProprietaryOrJCECipherbytes - the sequence of input bytes to be encryptedjava.security.InvalidKeyException - -javax.crypto.IllegalBlockSizeException - -javax.crypto.BadPaddingException - -public byte[] decrypt(byte[] inputBytes)
throws java.security.InvalidKeyException,
javax.crypto.IllegalBlockSizeException,
javax.crypto.BadPaddingException,
javax.crypto.BadPaddingException
ProprietaryOrJCECipherdecrypt in class ProprietaryOrJCECipherinputBytes - the sequence of bytes to be decryptedjava.security.InvalidKeyException - -javax.crypto.IllegalBlockSizeException - -javax.crypto.BadPaddingException - -public void generatePrivateAndPublicKey(ProprietaryOrJCECipherCallbackObject callbackObject)
ProprietaryOrJCECiphergeneratePrivateAndPublicKey in class ProprietaryOrJCECiphercallbackObject - the callback Object (e.g. containing the server's Connection handler) that is available for directing callback methods to.public byte[] getPublishInfo()
ProprietaryOrJCECiphergetPublishInfo in class ProprietaryOrJCECipherpublic void setPublishedInfo(byte[] cipherInfo)
ProprietaryOrJCECiphersetPublishedInfo in class ProprietaryOrJCECiphercipherInfo - The byte array containing all the needed info to set up the Cipher