experimental/hash
adding primop function calculating hash of a string Signed-off-by: Marc Weber <marco-oweber@gmx.de>
This commit is contained in:
parent
8add116acd
commit
01a5ea9914
3 changed files with 33 additions and 0 deletions
1
tests/lang/eval-okay-hash.exp
Normal file
1
tests/lang/eval-okay-hash.exp
Normal file
|
@ -0,0 +1 @@
|
|||
[ "6c69ee7f211c640419d5366cc076ae46" "bb3438fbabd460ea6dbd27d153e2233b" "900a4469df00ccbfd0c145c6d1e4b7953dd0afafadd7534e3a4019e8d38fc663" "ad0387b3bd8652f730ca46d25f9c170af0fd589f42e7f23f5a9e6412d97d7e56" ]
|
6
tests/lang/eval-okay-hash.nix
Normal file
6
tests/lang/eval-okay-hash.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
let
|
||||
md5 = builtins.hash "md5";
|
||||
sha256 = builtins.hash "sha256";
|
||||
strings = [ "text 1" "text 2" ];
|
||||
in
|
||||
(builtins.map md5 strings) ++ (builtins.map sha256 strings)
|
Loading…
Add table
Add a link
Reference in a new issue