public enum BouncyCastleEncryptedPrivateKeyInfoDecryptor extends Enum<BouncyCastleEncryptedPrivateKeyInfoDecryptor> implements Decryptor
| Enum Constant and Description |
|---|
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
decrypt(byte[] encrypted,
char[] password)
Decrypts encrypted bytes, using the given password as decryption key.
|
static BouncyCastleEncryptedPrivateKeyInfoDecryptor |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static BouncyCastleEncryptedPrivateKeyInfoDecryptor[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final BouncyCastleEncryptedPrivateKeyInfoDecryptor INSTANCE
public static BouncyCastleEncryptedPrivateKeyInfoDecryptor[] values()
for (BouncyCastleEncryptedPrivateKeyInfoDecryptor c : BouncyCastleEncryptedPrivateKeyInfoDecryptor.values()) System.out.println(c);
public static BouncyCastleEncryptedPrivateKeyInfoDecryptor valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic byte[] decrypt(byte[] encrypted,
char[] password)
throws GeneralSecurityException
DecryptorThe 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.
decrypt in interface Decryptorencrypted - data to decryptpassword - decryption keynull if decryption failedGeneralSecurityException - may be thrown if decryption failedCopyright © 2018–2024 The Apache Software Foundation. All rights reserved.