Class SHA


  • public class SHA
    extends java.lang.Object
    Utility methods for performing SHA calculations.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static byte[] ComputeSHA​(byte[] MT, byte[] result, int offset)
      Does Dallas SHA, as specified in DS1963S datasheet.
      static void ComputeSHA​(byte[] MT, int[] ABCDE)
      Does Dallas SHA, as specified in DS1963S datasheet.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • ComputeSHA

        public static final byte[] ComputeSHA​(byte[] MT,
                                              byte[] result,
                                              int offset)
        Does Dallas SHA, as specified in DS1963S datasheet. result is in intel Endian format, starting with the LSB of E to the MSB of E followed by the LSB of D. result array should be at least 20 bytes long, after the offset.
        Parameters:
        MT - The message block (padded if necessary).
        result - The byte[] into which the result will be copied.
        offset - The starting location in 'result' to start copying.
      • ComputeSHA

        public static final void ComputeSHA​(byte[] MT,
                                            int[] ABCDE)
        Does Dallas SHA, as specified in DS1963S datasheet. result is in intel Endian format, starting with the LSB of E to the MSB of E followed by the LSB of D.
        Parameters:
        MT - The message block (padded if necessary).
        ABCDE - The result will be copied into this 5-int array.