public interface SecureContainerFactory
Modifier and Type | Method and Description |
---|---|
SecureByteArray |
createByteArray(byte[] arrayToStore,
boolean wipeSource)
Creates the secure byte array object.
|
SecureString |
fromByteArray(byte[] arrayToStore,
boolean wipeSource)
Create a secure string objects from a byte array.
|
SecureString |
fromString(String stringToStore)
Create a secure string objects from a String.
|
SecureString |
fromString(String stringToStore,
String charsetName)
Create a secure string objects from a String using a specific character set.
|
SecureString fromString(String stringToStore)
stringToStore
- The string to securely store. The string will be converted to UTF-8 when stored in the
secure data
object.secure data
object that securely stores the data.IdpRuntimeException
- When failed to stringify data.SecureString fromString(String stringToStore, String charsetName)
Warning: This method does not guarantee that the given string and the given character set are compatible.
stringToStore
- The string to securely store.charsetName
- The string will be converted to this character when stored in the secure data
object. It
could be "UTF-8", "ISO-8859-15", "UTF-16", "US-ASCII", etc.secure data
object that securely stores the data.IdpRuntimeException
- When failed to stringify data.SecureString fromByteArray(byte[] arrayToStore, boolean wipeSource)
arrayToStore
- The byte array to securely store.wipeSource
- If true
, then the byte[]
will be erased if the method returns successfully.
Otherwise the input will not be modified.secure data
object that securely stores the data.SecureByteArray createByteArray(byte[] arrayToStore, boolean wipeSource)
arrayToStore
- The data to store to the output object.wipeSource
- Pass true
to wipe the original data.