de.intarsys.tools.crypto
Class SecretMemory
java.lang.Object
de.intarsys.tools.crypto.SecretMemory
public class SecretMemory
- extends Object
A memory holding secret values. Goal is to have "visible" secrets only at the
API of the store. Within the store the data is encrypted to doom memory
inspection..
For this strategy to be successful, its very important for clients to zero
out secrets that are no longer used.
The memory itself is based on opaque handles - this way no client can
enumerate or guess content of this memory - as long as the owner keeps its
handle private.
SecretMemory
public SecretMemory()
SecretMemory
public SecretMemory(ICryptdec cryptdec)
clear
public void clear()
getBytes
public byte[] getBytes(Object key)
throws IOException
- Throws:
IOException
getCharacters
public char[] getCharacters(Object key)
throws IOException
- Throws:
IOException
put
public Object put(byte[] secret)
throws IOException
- Throws:
IOException
put
public Object put(char[] secret)
throws IOException
- Throws:
IOException
remove
public void remove(Object key)
Copyright © 2012 intarsys consulting GmbH. All Rights Reserved.