net.i2p.crypto

## Class Hash384

- java.lang.Object
- - net.i2p.data.SimpleDataStructure
  - - net.i2p.crypto.Hash384

- All Implemented Interfaces:
    DataStructure

      public class Hash384
      extends SimpleDataStructure

  SHA-384 secure hash algorithm implementation. This class provides the SHA-384 hash algorithm as specified in FIPS PUB 180-4, producing a 48-byte (384-bit) message digest. SHA-384 is part of the SHA-2 family and offers higher security than SHA-256 with similar performance.

  Common uses in I2P include:

  - Enhanced security requirements for sensitive data
  - Digital signature generation with longer hash outputs
  - Cryptographic key derivation and verification

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `HASH_LENGTH`

    - ### Fields inherited from class net.i2p.data.SimpleDataStructure

      `_data`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Hash384()`
    `Hash384(byte[] data)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `length()` The legal length of the byte array in this data structure

    - ### Methods inherited from class net.i2p.data.SimpleDataStructure

      `calculateHash, equals, fromBase64, fromByteArray, getData, hashCode, read, readBytes, setData, toBase64, toByteArray, toString, writeBytes`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### HASH_LENGTH

          public static final int HASH_LENGTH

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### Hash384

          public Hash384()

    - #### Hash384

          public Hash384(byte[] data)

      Throws:
        `IllegalArgumentException` - if data is not correct length (null is ok)

  - ### Method Detail

    - #### length

          public int length()

      Description copied from class: `SimpleDataStructure`
      The legal length of the byte array in this data structure
      Specified by:
        `length` in class `SimpleDataStructure`