Skip to main content
Package: com.coinbase.cdp.auth
Utility class for cryptographic hashing operations.

Method Details

sha256Hex

Overload 1
Computes the SHA-256 hash of a byte array and returns it as a lowercase hex string. Parameters: input (byte[]) - the bytes to hash Returns: String - the SHA-256 hash as a lowercase hex string Throws: [RuntimeException](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/RuntimeException.html "class or interface in java.lang") - if SHA-256 algorithm is not available Overload 2
Computes the SHA-256 hash of a string and returns it as a lowercase hex string. Parameters: input (String) - the string to hash Returns: String - the SHA-256 hash as a lowercase hex string Throws: [RuntimeException](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/RuntimeException.html "class or interface in java.lang") - if SHA-256 algorithm is not available