feat(tvix/eval): implement builtins.hashString
Implements md5, sha1, sha256 and sha512 using the related crates from the RustCrypto hashes project (https://github.com/RustCrypto/hashes) Change-Id: I00730dea44ec9ef85309edc27addab0ae88814b8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11005 Tested-by: BuildkiteCI Reviewed-by: aspen <root@gws.fyi>
This commit is contained in:
parent
ffb134398d
commit
5c3065b43a
14 changed files with 263 additions and 11 deletions
|
|
@ -524,6 +524,12 @@ impl<'a> From<&'a NixString> for &'a BStr {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<NixString> for String {
|
||||
fn from(s: NixString) -> Self {
|
||||
s.to_string()
|
||||
}
|
||||
}
|
||||
|
||||
impl From<NixString> for BString {
|
||||
fn from(s: NixString) -> Self {
|
||||
s.as_bstr().to_owned()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue