Class 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 new MessageDigest instance.
    • Method Summary

      Modifier and Type Method Description
      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 fireSend 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

      • DESSHA1

        public DESSHA1()
                throws java.lang.InstantiationException
        Creates a new MessageDigest instance.
        Throws:
        java.lang.InstantiationException - an exception
    • 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 SessionID
        key - passkey, such as password or handshake
        Returns:
        String with 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 by digest(). Data is returned in the format specified by the Jabber protocol.
        Parameters:
        data - some bytes
        Returns:
        String of our hex bytes