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