public interface Decryptor
| Modifier and Type | Method and Description |
|---|---|
byte[] |
decrypt(byte[] encrypted,
char[] password)
Decrypts encrypted bytes, using the given password as decryption key.
|
byte[] decrypt(byte[] encrypted,
char[] password)
throws GeneralSecurityException
The encrypted data must contain enough information about the encryption algorithm used so that it can be decrypted at all.
If the password is wrong, the method may return wrongly decrypted data. If decryption fails, it may return
null or throw a GeneralSecurityException.
The caller is responsible for eventually clearing the password and the decrypted data returned.
encrypted - data to decryptpassword - decryption keynull if decryption failedGeneralSecurityException - may be thrown if decryption failedCopyright © 2018–2024 The Apache Software Foundation. All rights reserved.