Package org.tn5250j.tools
Class DESSHA1
- java.lang.Object
-
- org.tn5250j.tools.DESSHA1
-
- All Implemented Interfaces:
java.io.Serializable
public class DESSHA1 extends java.lang.Object implements java.io.Serializable- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DESSHA1()Creates a newMessageDigestinstance.
-
Method Summary
Modifier and Type Method Description static java.lang.StringbytesToHex(byte[] data)This utility method is passed an array of bytes.java.lang.Stringdigest(java.lang.String identifier, java.lang.String key)used to hash passwords and other key data to fireSend over the wire, to prevent plaintext transmit.
-
-
-
Method Detail
-
digest
public java.lang.String digest(java.lang.String identifier, java.lang.String key)used to hash passwords and other key data to fireSend over the wire, to prevent plaintext transmit.- Parameters:
identifier- prefix, such as the SessionIDkey- passkey, such as password or handshake- Returns:
Stringwith the hash in hex string form
-
bytesToHex
public static java.lang.String bytesToHex(byte[] data)
This utility method is passed an array of bytes. It returns this array as a String in hexadecimal format. This is used internally bydigest(). Data is returned in the format specified by the Jabber protocol.- Parameters:
data- some bytes- Returns:
- String of our hex bytes
-
-