au.net.aba.crypto.provider
Class RC4Key

java.lang.Object
  |
  +--au.net.aba.crypto.provider.RC4Key

public class RC4Key
extends java.lang.Object
implements SecretKey, java.io.Externalizable

A class wrapper for RC4 keys.

See Also:
Serialized Form

Field Summary
static java.lang.String ident
           
 
Constructor Summary
RC4Key()
          Construct an empty RC4Key.
RC4Key(byte[] b)
          Construct an RC4Key from a set of bytes.
 
Method Summary
 java.lang.String getAlgorithm()
          return algorithm this key is for.
 byte[] getEncoded()
          return an encoded representation of the key.
 java.lang.String getFormat()
          return the format this key is in.
 void readExternal(java.io.ObjectInput in)
          serialisation support using Externalizable.
 void writeExternal(java.io.ObjectOutput out)
          serialisation support using Externalizable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ident

public static final java.lang.String ident
Constructor Detail

RC4Key

public RC4Key()
Construct an empty RC4Key.

RC4Key

public RC4Key(byte[] b)
Construct an RC4Key from a set of bytes.
Parameters:
b - The data bytes.
Method Detail

getAlgorithm

public java.lang.String getAlgorithm()
return algorithm this key is for.
Parameters:
the - string "RC4".

getFormat

public java.lang.String getFormat()
return the format this key is in.
Parameters:
the - string "RAW".

getEncoded

public byte[] getEncoded()
return an encoded representation of the key.
Returns:
the key as a byte array.

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
serialisation support using Externalizable.
Specified by:
writeExternal in interface java.io.Externalizable
Parameters:
out - the object output stream.

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException
serialisation support using Externalizable.
Specified by:
readExternal in interface java.io.Externalizable
Parameters:
in - the object input stream.