pub fn sha3_256(data: &str) -> String
Expand description
Computes the SHA3-256 hash of the input data.
This function accepts a string input, which is expected to be hex-encoded. If the input is not a valid hex string, it falls back to hashing an empty byte array. The resulting hash is 256 bits (32 bytes) and is returned as a hex-encoded string.
§Arguments
data
- A string slice representing the input data, expected to be hex-encoded.
§Returns
String
- The SHA3-256 hash of the input data, encoded as a hex string.
§Panics
- This function will not panic, but if
data
is not a valid hex string, it will hash an empty byte array.