|
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.Object | +--gnu.crypto.key.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,
java.lang.String algorithm)
Creates a new secret key from a portion of a byte array. |
|
GnuSecretKey(byte[] key,
java.lang.String algorithm)
Creates a new secret key. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
|
java.lang.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. |
java.lang.String |
getFormat()
Returns the string "RAW". |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public GnuSecretKey(byte[] key, java.lang.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, java.lang.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 java.lang.String getAlgorithm()
getAlgorithm
in interface java.security.Key
public byte[] getEncoded()
getEncoded
in interface java.security.Key
public java.lang.String getFormat()
getFormat
in interface java.security.Key
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.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 |