Class PBECipher
java.lang.Object
org.sonatype.plexus.components.cipher.PBECipher
This class is thread-safe.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final SecureRandom
protected static final int
protected static final String
protected static final String
protected static final String
protected static final int
protected static final int
protected static final int
protected static final String
protected static final byte
-
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
STRING_ENCODING
- See Also:
-
SPICE_SIZE
protected static final int SPICE_SIZE- See Also:
-
SALT_SIZE
protected static final int SALT_SIZE- See Also:
-
CHUNK_SIZE
protected static final int CHUNK_SIZE- See Also:
-
WIPER
protected static final byte WIPER- See Also:
-
DIGEST_ALG
- See Also:
-
KEY_ALG
- See Also:
-
CIPHER_ALG
- See Also:
-
PBE_ITERATIONS
protected static final int PBE_ITERATIONS- See Also:
-
_secureRandom
-
-
Constructor Details
-
PBECipher
public PBECipher()
-
-
Method Details
-
getSalt
private byte[] getSalt(int sz) -
encrypt64
- Throws:
PlexusCipherException
-
decrypt64
- Throws:
PlexusCipherException
-
createCipher
private Cipher createCipher(byte[] pwdAsBytes, byte[] salt, int mode) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, InvalidAlgorithmParameterException
-