public interface InternalCryptoProvider
As per the design decisions, the contract should never be amended in a way that the secret keys are returned to the caller.
| Modifier and Type | Method and Description |
|---|---|
byte[] |
decrypt(byte[] ciphertext,
String algorithm,
String javaSecurityAPIProvider)
Computes and returns the cleartext of the given ciphertext.
|
byte[] |
encrypt(byte[] cleartext,
String algorithm,
String javaSecurityAPIProvider)
Computes and returns the ciphertext of the given cleartext.
|
default byte[] |
encrypt(byte[] cleartext,
String algorithm,
String javaSecurityAPIProvider,
boolean returnSelfContainedCipherText)
Computes and returns the ciphertext of the given cleartext.
|
byte[] encrypt(byte[] cleartext,
String algorithm,
String javaSecurityAPIProvider)
throws CryptoException
cleartext - The cleartext to be encrypted.algorithm - The encryption / decryption algorithmjavaSecurityAPIProvider - CryptoException - If something unexpected happens during the encryption operation.byte[] decrypt(byte[] ciphertext,
String algorithm,
String javaSecurityAPIProvider)
throws CryptoException
ciphertext - The ciphertext to be decrypted.algorithm - The encryption / decryption algorithmjavaSecurityAPIProvider - CryptoException - If something unexpected happens during the decryption operation.default byte[] encrypt(byte[] cleartext,
String algorithm,
String javaSecurityAPIProvider,
boolean returnSelfContainedCipherText)
throws CryptoException
cleartext - The cleartext to be encrypted.algorithm - The encryption / decryption algorithmjavaSecurityAPIProvider - The Java Security API provider.returnSelfContainedCipherText - Whether cipher text need to be self contained.CryptoExceptionCopyright © 2020 WSO2. All rights reserved.