java.lang.Object
de.cuioss.tools.net.ssl.KeyMaterialHolder
- All Implemented Interfaces:
Serializable
Runtime representation of key-material. The actual key is provided as byte[].
An optional keyPassword is available as well.
- Author:
- Oliver Wolff
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]deserializeKeyMaterial(String serializedKeyMaterial) char[]static StringserializeKeyMaterial(byte[] keyMaterial)
-
Constructor Details
-
KeyMaterialHolder
public KeyMaterialHolder()
-
-
Method Details
-
getKeyPasswordAsCharArray
- Returns:
- NPE-safe char-array representation of
#getKeyPassword(). If keyPassword isnullor empty it returns an empty char[], nevernull
-
deserializeKeyMaterial
- Parameters:
serializedKeyMaterial- the Base64 encoded key material- Returns:
- Raw i.e. original key material
- Throws:
IllegalArgumentException- if serializedKeyMaterial is not Base64 encoded
-
serializeKeyMaterial
- Parameters:
keyMaterial- Raw i.e. original key material- Returns:
- Base64 encoded key material
-