A CipherProvider is a wrapper for a Cipher class in JCE.
This service is only available when run on JDK1.2 or beyond.
To use this service, either the SunJCE or an alternative clean room
implementation of the JCE must be installed.
To use a CipherProvider to encrypt or decrypt, it needs 3 things:
1) A CipherProvider that is initialized to ENCRYPT or DECRYPT
2) A secret Key for the encryption/decryption
3) An Initialization Vector (IvParameterSpec) that is used to create some
randomness in the encryption
int decrypt(byte ciphertext,
Decrypt data - use only with Cipher that has been initialized with
ciphertext - the byte array containing the ciphertext
offset - decrypt from this byte offset in the ciphertext
length - decrypt this many bytes starting from offset
cleartext - the byte array to store the cleartext
outputOffset - the offset into the cleartext array the output
If cleartext and ciphertext are the same array, caller must be careful
to not overwrite the ciphertext before it is un-scrambled.