Class DefaultEncryptor
java.lang.Object
org.apache.syncope.core.spring.security.DefaultEncryptor
- All Implemented Interfaces:
Encryptor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Optional<SecretKeySpec> protected final SecurityProperties.DigesterPropertiesprotected final Map<CipherAlgorithm, org.jasypt.digest.StandardStringDigester> protected static final Logger -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefaultEncryptor(String aesSecretKey, SecurityProperties.DigesterProperties digesterProperties) -
Method Summary
Modifier and TypeMethodDescriptiondecode(String encoded, CipherAlgorithm cipherAlgorithm) encode(String value, CipherAlgorithm cipherAlgorithm) protected org.jasypt.digest.StandardStringDigestergetDigester(CipherAlgorithm cipherAlgorithm) booleanverify(String value, CipherAlgorithm cipherAlgorithm, String encoded)
-
Field Details
-
LOG
-
digesterProperties
-
digesters
-
aesKeySpec
-
-
Constructor Details
-
DefaultEncryptor
protected DefaultEncryptor(String aesSecretKey, SecurityProperties.DigesterProperties digesterProperties)
-
-
Method Details
-
encode
public String encode(String value, CipherAlgorithm cipherAlgorithm) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException - Specified by:
encodein interfaceEncryptor- Throws:
NoSuchAlgorithmExceptionNoSuchPaddingExceptionInvalidKeyExceptionIllegalBlockSizeExceptionBadPaddingException
-
verify
-
decode
public String decode(String encoded, CipherAlgorithm cipherAlgorithm) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException - Specified by:
decodein interfaceEncryptor- Throws:
NoSuchAlgorithmExceptionNoSuchPaddingExceptionInvalidKeyExceptionIllegalBlockSizeExceptionBadPaddingException
-
getDigester
-