ENC
- The type of the encrypted data.DEC
- The type of the decrypted data.EXC
- The specific type of the DecryptionException
being
thrown.Crypter<ENC,DEC,ENCEXC,DECEXC>
public interface Decrypter<DEC,ENC,EXC extends DecryptionException>
toDecrypted(Object)
and for forcing your plain functionality to
provide a bridge to the Java Cryptographic Extension (JCE) framework's
CipherSpi
as of toDecrypted(byte[], int, int, byte[], int)
.
This way you can use your algorithms outside the JCE framework. This may be
necessary when your Java's security settings prevent running your own JCE
extensions from inside an (Oracle-) unsigned JAR.Modifier and Type | Method | Description |
---|---|---|
default int |
decrypt(byte[] aBuffer) |
This method decrypts the provided buffer.
|
default int |
decrypt(byte[] aBuffer,
int aOffset,
int aLength) |
This method decrypts the provided buffer beginning sat the given offset
and the given number of bytes.
|
int |
toDecrypted(byte[] aBuffer,
int aIOffset,
int aLength,
byte[] aOutBuffer,
int aOutOffset) |
For compatibility with the java.security framework, especially to be
integrated in a sub-class of the
CipherSpi . |
DEC |
toDecrypted(ENC aInput) |
You pass in data of a given type and you get decrypted data of (another)
given type.
|
DEC toDecrypted(ENC aInput) throws EXC extends DecryptionException
aInput
- The input data to be decrypted.EXC
- Thrown in case something went wrong upon decryption.EXC extends DecryptionException
int toDecrypted(byte[] aBuffer, int aIOffset, int aLength, byte[] aOutBuffer, int aOutOffset) throws DecryptionException
CipherSpi
.aBuffer
- The input to be decrypted.aIOffset
- The offset to start decryption.aLength
- The length to be decryptedaOutBuffer
- The output where to decrypt to.aOutOffset
- The offset where to start writing the decrypted output.DecryptionException
- Thrown in case a decryption issue occurred
regarding the Decrypter
. Probably the configuration of
your Encrypter
does not fit the one of the
Decrypter
.ArrayIndexOutOfBoundsException
- In case you provided lengths and
offsets not fitting with the provided arrays.default int decrypt(byte[] aBuffer, int aOffset, int aLength) throws DecryptionException
aBuffer
- The input to be decrypted.aOffset
- The offset to start decryption.aLength
- The length to be decryptedDecryptionException
- Thrown in case a decryption issue occurred
regarding the Decrypter
. Probably the configuration of
your Encrypter
does not fit the one of the
Decrypter
.ArrayIndexOutOfBoundsException
- In case you provided lengths and
offsets not fitting with the provided arrays.default int decrypt(byte[] aBuffer) throws DecryptionException
aBuffer
- The input to be decrypted.DecryptionException
- Thrown in case a decryption issue occurred
regarding the Decrypter
. Probably the configuration of
your Encrypter
does not fit the one of the
Decrypter
.ArrayIndexOutOfBoundsException
- In case you provided lengths and
offsets not fitting with the provided arrays.Copyright © 2021. All rights reserved.