Sha0
Computes a SHA-0 digest.
Module: Std::Hash::Sha0
Signature
rux
func Hash(message: char8[]) -> String;Parameters
| Name | Type | Description |
|---|---|---|
message | char8[] | The data to hash. |
Returns
String — the 20-byte (160-bit) digest as a 40-character lowercase hex string.
Description
SHA-0 is the original 1993 secure-hash design, withdrawn and replaced by SHA-1 after a flaw was found. It is provided mainly for historical and interoperability purposes. Call it as Sha0::Hash(...).
WARNING
SHA-0 is cryptographically broken and was deprecated decades ago. Never use it for security. Prefer Sha256, Blake2, or Blake3.
Example
rux
import Std::Hash::Sha0;
import Std::Io::PrintLine;
func Main() -> int {
PrintLine(Sha0::Hash("hello"));
return 0;
}