intarsys runtime library

de.intarsys.tools.crypto
Class SecretMemory

java.lang.Object
  extended by 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.


Constructor Summary
SecretMemory()
           
SecretMemory(ICryptdec cryptdec)
           
 
Method Summary
 void clear()
           
 byte[] getBytes(Object key)
           
 char[] getCharacters(Object key)
           
 Object put(byte[] secret)
           
 Object put(char[] secret)
           
 void remove(Object key)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecretMemory

public SecretMemory()

SecretMemory

public SecretMemory(ICryptdec cryptdec)
Method Detail

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)

intarsys runtime library

Copyright © 2012 intarsys consulting GmbH. All Rights Reserved.