pub fn hash(
data: &str,
algorithm: HashAlgorithm,
digest: DigestFormat,
) -> Result<String>Expand description
Computes a cryptographic hash (one-way, keyless).
§Arguments
data- Data to hashalgorithm- Hash algorithm to usedigest- Output encoding format
§Returns
Encoded hash string.
§Examples
use ccxt_core::auth::{hash, HashAlgorithm, DigestFormat};
let hashed = hash("test", HashAlgorithm::Sha256, DigestFormat::Hex).unwrap();