public class AesPropertyEncoder extends Object implements PropertyEncoder
Implements the PropertyEncoder interface using the AES algorithm.
| Constructor and Description |
|---|
AesPropertyEncoder()
Constructs a new instance using the default key.
|
AesPropertyEncoder(String key)
Constructs a new instance using an alternative key.
|
| Modifier and Type | Method and Description |
|---|---|
String |
decode(String propertyValue)
Decodes the given property value, transforming sub-strings delimited by the
<ENC> marker. |
String |
encode(String propertyValue)
Encodes the given property value, transforming sub-strings delimited by the
<ENCODE> marker. |
public AesPropertyEncoder()
Constructs a new instance using the default key.
public AesPropertyEncoder(String key)
Constructs a new instance using an alternative key.
key - the alternative key to be used (should be a UTF-8 encoded string 16 bytes long)public String encode(String propertyValue)
PropertyEncoderEncodes the given property value, transforming sub-strings delimited by the
<ENCODE> marker.
The resulting encoded property will contain equivalent sub-strings delimited by
the <ENC> marker.
encode in interface PropertyEncoderpropertyValue - the property value to be encodedpublic String decode(String propertyValue)
PropertyEncoderDecodes the given property value, transforming sub-strings delimited by the
<ENC> marker.
The resulting decoded property will contain equivalent sub-strings without markers.
decode in interface PropertyEncoderpropertyValue - the property value to be decodedCopyright © 2010 - 2019 edorasware ag. All Rights Reserved.