public class ValueEncryptor extends Object
| Constructor and Description |
|---|
ValueEncryptor(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) |
ValueEncryptor(ConfigIntf cfg,
String provider,
String signature,
String key,
String algorithm)
Deprecated.
|
ValueEncryptor(ConfigIntf cfg,
String provider,
String signature,
String key,
String keyID,
String algorithm)
old key file support
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkAlgorithm(String algorithm) |
protected void |
checkKey(String key) |
protected void |
checkProvider(String provider) |
protected void |
checkSignature(String signature) |
String |
decrypt(SecretKey key,
String text) |
String |
decrypt(String encrypted)
Password based (salted) decryption.
|
static void |
dumpProviderInfo() |
String |
encrypt(String plaintext)
Password based (random salted) Encryption The submitted String will be encrypted using a random salt of 64 bits
|
protected Cipher |
getCipher() |
protected ConfigIntf |
getConfig()
returns the configuration (object) of the MasterTenanat
|
public ValueEncryptor(ConfigIntf cfg, String provider, String signature, Map<String,SecretKey> keys, String algorithm)
provider - signature - keys - algorithm - public ValueEncryptor(ConfigIntf cfg, String provider, String signature, Map<String,SecretKey> keys, String algorithm, String defaultSymmetricEncryptionKeyID)
provider - signature - keys - algorithm - defaultSymmetricEncryptionKeyID - @Deprecated public ValueEncryptor(ConfigIntf cfg, String provider, String signature, String key, String algorithm)
provider - signature - key - algorithm - protected ConfigIntf getConfig()
protected Cipher getCipher() throws NoSuchAlgorithmException, NoSuchProviderException, NoSuchPaddingException
protected void checkSignature(String signature)
protected void checkKey(String key)
protected void checkAlgorithm(String algorithm)
protected void checkProvider(String provider)
public String encrypt(String plaintext) throws InvalidKeyException, NoSuchAlgorithmException, NoSuchProviderException, NoSuchPaddingException, InvalidAlgorithmParameterException, IllegalBlockSizeException, BadPaddingException, UnsupportedEncodingException
public String decrypt(String encrypted)
public static void dumpProviderInfo()
Copyright © 2017 SAP SE. All Rights Reserved.