JXTA

jxta.security.impl.cipher
Class SecretKey

java.lang.Object
  |
  +--jxta.security.impl.cipher.SecretKey

public final class SecretKey
extends java.lang.Object
implements jxta.security.cipher.Key


Constructor Summary
SecretKey(byte type, short len)
          Constructor
 
Method Summary
 void clearKey()
          Clear key values
 byte getKey(byte[] buf, int off)
          Here we copy the secret key into the buffer
 int getLength()
          Length in bytes - Keys SHOULD be multiples of 8
 short getSize()
          Return Size in bits
 byte getType()
          Return key type code
 boolean isInitialized()
          Initialization state
 void setKey(byte[] buf, int off)
          Set the key into secret
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecretKey

public SecretKey(byte type,
                 short len)
Constructor
Method Detail

isInitialized

public boolean isInitialized()
Initialization state
Specified by:
isInitialized in interface jxta.security.cipher.Key

clearKey

public void clearKey()
Clear key values
Specified by:
clearKey in interface jxta.security.cipher.Key

getSize

public short getSize()
Return Size in bits
Specified by:
getSize in interface jxta.security.cipher.Key

getLength

public int getLength()
Length in bytes - Keys SHOULD be multiples of 8
Specified by:
getLength in interface jxta.security.cipher.Key

getType

public byte getType()
Return key type code
Specified by:
getType in interface jxta.security.cipher.Key

getKey

public byte getKey(byte[] buf,
                   int off)
Here we copy the secret key into the buffer

setKey

public void setKey(byte[] buf,
                   int off)
            throws jxta.security.exceptions.CryptoException
Set the key into secret

JXTA