Class ValueEncryptor
java.lang.Object
de.hybris.platform.util.encryption.ValueEncryptor
-
Constructor Summary
ConstructorsConstructorDescriptionValueEncryptor(ConfigIntf cfg, String provider, String signature, String keyID, String algorithm) old key file supportValueEncryptor(ConfigIntf cfg, String provider, String signature, String key, String keyID, String algorithm) Deprecated, for removal: This API element is subject to removal in a future version.since 1811 old key file supportValueEncryptor(ConfigIntf cfg, String provider, String signature, Map<String, SecretKey> keys, String algorithm) ValueEncryptor(ConfigIntf cfg, String provider, String signature, Map<String, SecretKey> keys, String algorithm, String defaultSymmetricEncryptionKeyID) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckAlgorithm(String algorithm) protected voidprotected voidcheckProvider(String provider) protected voidcheckSignature(String signature) Password based (salted) decryption.static voidPassword based (random salted) Encryption The submitted String will be encrypted using a random salt of 64 bitsprotected Cipherprotected ConfigIntfreturns the configuration (object) of the MasterTenanat
-
Constructor Details
-
ValueEncryptor
public ValueEncryptor(ConfigIntf cfg, String provider, String signature, Map<String, SecretKey> keys, String algorithm) - Parameters:
provider-signature-keys-algorithm-
-
ValueEncryptor
public ValueEncryptor(ConfigIntf cfg, String provider, String signature, Map<String, SecretKey> keys, String algorithm, String defaultSymmetricEncryptionKeyID) - Parameters:
provider-signature-keys-algorithm-defaultSymmetricEncryptionKeyID-
-
ValueEncryptor
public ValueEncryptor(ConfigIntf cfg, String provider, String signature, String keyID, String algorithm) old key file support- Parameters:
provider-signature-keyID-algorithm-
-
ValueEncryptor
@Deprecated(since="1811", forRemoval=true) public ValueEncryptor(ConfigIntf cfg, String provider, String signature, String key, String keyID, String algorithm) Deprecated, for removal: This API element is subject to removal in a future version.since 1811 old key file support- Parameters:
provider-signature-key-keyID-algorithm-
-
-
Method Details
-
getConfig
returns the configuration (object) of the MasterTenanat- Returns:
- configuration
-
getCipher
protected Cipher getCipher() throws NoSuchAlgorithmException, NoSuchProviderException, NoSuchPaddingException -
checkSignature
-
checkKey
-
checkAlgorithm
-
checkProvider
-
encrypt
public String encrypt(String plaintext) throws InvalidKeyException, NoSuchAlgorithmException, NoSuchProviderException, NoSuchPaddingException, InvalidAlgorithmParameterException, IllegalBlockSizeException, BadPaddingException, UnsupportedEncodingException Password based (random salted) Encryption The submitted String will be encrypted using a random salt of 64 bits -
decrypt
Password based (salted) decryption. The submitted String object will be decrypted using a salt of 64 bits. -
decrypt
-
dumpProviderInfo
public static void dumpProviderInfo()
-