1use jrsonnet_evaluator::{error::Result, function::builtin, IStr};23#[builtin]4pub fn builtin_md5(str: IStr) -> Result<String> {5 Ok(format!("{:x}", md5::compute(str.as_bytes())))6}78#[cfg(feature = "exp-more-hashes")]9#[builtin]10pub fn builtin_sha256(str: IStr) -> Result<String> {11 use sha2::digest::Digest;12 Ok(format!("{:?}", sha2::Sha256::digest(str.as_bytes())))13}difftreelog
source
crates/jrsonnet-stdlib/src/hash.rs370 Bsourcehistory