Package org.jivesoftware.util
Interface Encryptor
- All Known Implementing Classes:
AesEncryptor,Blowfish
public interface Encryptor
-
Method Summary
Modifier and TypeMethodDescriptionDecrypt an encrypted String.Decrypt an encrypted String.Encrypt a clear text String.Encrypt a clear text String.voidSet the encryption key.
-
Method Details
-
encrypt
Encrypt a clear text String.- Parameters:
value- The clear text attribute- Returns:
- The encrypted attribute, or null
-
encrypt
Encrypt a clear text String.- Parameters:
value- The clear text attributeiv- The IV to use, or null for the default IV- Returns:
- The encrypted attribute, or null
-
decrypt
Decrypt an encrypted String.- Parameters:
value- The encrypted attribute in Base64 encoding- Returns:
- The clear text attribute, or null
-
decrypt
Decrypt an encrypted String.- Parameters:
value- The encrypted attribute in Base64 encodingiv- The IV to use, or null for the default IV- Returns:
- The clear text attribute, or null
-
setKey
Set the encryption key. This will apply the user-defined key, truncated or filled (via the default key) as needed to meet the key length specifications.- Parameters:
key- The encryption key
-