|
For the latest news and information visit The GNU Crypto project |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgnu.crypto.key.GnuSecretKey
public class GnuSecretKey
A secret key composed of a sequence of raw, unformatted octets. This class
is analogous to the SecretKeySpec
class, but is
provided for platforms that do not or cannot contain that class.
Field Summary |
---|
Fields inherited from interface java.security.Key |
---|
serialVersionUID |
Constructor Summary | |
---|---|
GnuSecretKey(byte[] key,
int offset,
int length,
String algorithm)
Creates a new secret key from a portion of a byte array. |
|
GnuSecretKey(byte[] key,
String algorithm)
Creates a new secret key. |
Method Summary | |
---|---|
boolean |
equals(Object o)
|
String |
getAlgorithm()
Returns the algorithm name, if any. |
byte[] |
getEncoded()
Returns the encoded key, which is merely the byte array this class was created with. |
String |
getFormat()
Returns the string "RAW". |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public GnuSecretKey(byte[] key, String algorithm)
key
- The raw, secret key.algorithm
- The algorithm name, which can be null or empty.public GnuSecretKey(byte[] key, int offset, int length, String algorithm)
key
- The raw, secret key.offset
- The offset at which the key begins.length
- The number of bytes that comprise the key.algorithm
- The algorithm name, which can be null or empty.Method Detail |
---|
public String getAlgorithm()
getAlgorithm
in interface Key
public byte[] getEncoded()
getEncoded
in interface Key
public String getFormat()
getFormat
in interface Key
public boolean equals(Object o)
equals
in class Object
public String toString()
toString
in class Object
|
For the latest news and information visit The GNU Crypto project |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |