Secure Utilities
hash_str(val, algorithm=HashAlgoEnum.sha256)
Hash a string using a specified hash algorithm.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
val
|
(str | bytes, required)
|
The value to be hashed. |
required |
algorithm
|
HashAlgoEnum | str
|
The hash algorithm to use. Defaults to |
sha256
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The hexadecimal representation of the digest. |