Modifier and Type | Method and Description |
---|---|
static Encryptor |
addChecksum(Encryptor delegate)
Wraps the delegate such that any change in the encrypted data is guaranteed to be detected and raised
as a
WrongKeyException . |
static String |
encrypt(Encryptor encryptor,
byte[] salt,
char[] subject)
Encodes the subject as UTF-8, (optionally) prepends it with the salt, encrypts the resulting bytes,
and BASE64-encodes them.
|
static String |
encrypt(Encryptor encryptor,
char[] subject)
Encodes the subject as UTF-8, encrypts the resulting bytes, and BASE64-encodes them.
|
static Encryptor |
fromKey(Key key)
Creates and returns an
Encryptor which uses the given key for encryptionWhen this method returns, the
key may safely be destroyed. |
public static Encryptor fromKey(Key key)
Encryptor
which uses the given key for encryptionWhen this method returns, the
key may safely be destroyed.public static Encryptor addChecksum(Encryptor delegate)
WrongKeyException
.public static String encrypt(Encryptor encryptor, char[] subject)
Copyright © 2018 Arno Unkrig. All rights reserved.