SHA384 Function
Overview
The SHA384 function computes the SHA-384 hash value for a given string. SHA-384 is a variant of the SHA-2 family of hash algorithms that can map arbitrary-length data to a fixed-length (384-bit) hash value, outputting a 96-character hexadecimal string.
Syntax
sha384(expr)
Parameters
expr: The input data for which to compute the SHA-384 hash value. Supports STRING, VARCHAR, CHAR, and BINARY types.
Return Result
Returns a STRING type value representing the computed 96-character hexadecimal hash string.
Examples
-
Compute the SHA-384 value of a simple string:
-
Compute the SHA-384 value of a string containing special characters:
-
When the input is NULL:
Notes
- SHA-384 hash values are irreversible, meaning the original data cannot be derived from the hash value.
- SHA-384 outputs a fixed 96-character hexadecimal string (384 bits).
- When the input parameter is NULL, the result is NULL.
- SHA-384 belongs to the SHA-2 family of algorithms, offering higher security than SHA-256, suitable for data integrity verification, digital signatures, and other scenarios requiring higher security.
