net.corda.core.crypto

## Class SecureHash

- net.corda.core.serialization.OpaqueBytes
- - net.corda.core.crypto.SecureHash

- Direct Known Subclasses:
    SecureHash.SHA256

      public class SecureHash
      extends OpaqueBytes

  Container for a cryptographically secure hash value. Provides utilities for generating a cryptographic hash using different algorithms (currently only SHA-256 supported).

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `SecureHash.Companion`
    `static class` | `SecureHash.SHA256` SHA-256 is part of the SHA-2 hash function family. Generated hash is fixed size, 256-bits (32-bytes)

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static SecureHash.Companion` | `Companion`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `SecureHash.SHA256` | `hashConcat(SecureHash other)`
    `static SecureHash.SHA256` | `parse(java.lang.String str)`
    `java.lang.String` | `prefixChars(int prefixLen)`
    `static SecureHash.SHA256` | `randomSHA256()`
    `static SecureHash.SHA256` | `sha256(byte[] bytes)`
    `static SecureHash.SHA256` | `sha256(java.lang.String str)`
    `static SecureHash.SHA256` | `sha256Twice(byte[] bytes)`
    `java.lang.String` | `toString()`

    - ### Methods inherited from class net.corda.core.serialization.OpaqueBytes

      `equals, getBytes, getSize, hashCode, open, toString`

- - ### Field Detail

    - #### Companion

          public static SecureHash.Companion Companion

  - ### Method Detail

    - #### toString

          public java.lang.String toString()

    - #### prefixChars

          public java.lang.String prefixChars(int prefixLen)

    - #### hashConcat

          public SecureHash.SHA256 hashConcat(SecureHash other)

    - #### parse

          public static SecureHash.SHA256 parse(java.lang.String str)

    - #### sha256

          public static SecureHash.SHA256 sha256(byte[] bytes)

    - #### sha256Twice

          public static SecureHash.SHA256 sha256Twice(byte[] bytes)

    - #### sha256

          public static SecureHash.SHA256 sha256(java.lang.String str)

    - #### randomSHA256

          public static SecureHash.SHA256 randomSHA256()