|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jabber.jabberbeans.util.SHA1Helper
A SHA1Helper
is used for authentication for users and
component authentication. It is simply a wrapper around MessageDigest to
give a simplified interface for performing the hashing.
Constructor Summary | |
SHA1Helper()
Creates a new MessageDigest instance. |
Method Summary | |
static java.lang.String |
bytesToHex(byte[] data)
This utility method is passed an array of bytes. |
java.lang.String |
digest(java.lang.String identifier,
java.lang.String key)
used to hash passwords and other key data to send over the wire, to prevent plaintext transmit. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SHA1Helper() throws java.lang.InstantiationException
MessageDigest
instance.
Method Detail |
public java.lang.String digest(java.lang.String identifier, java.lang.String key)
identifier
- prefix, such as the SessionIDkey
- passkey, such as password or handshake
String
with the hash in hex string formpublic static java.lang.String bytesToHex(byte[] data)
digest()
. Data is returned in
the format specified by the Jabber protocol.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |