Skip to content

Commit

Permalink
zuse: cuter blake3 API
Browse files Browse the repository at this point in the history
  • Loading branch information
lukechampine committed Sep 29, 2023
1 parent b7a6fa2 commit 14645b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pkg/arvo/sys/zuse.hoon
Expand Up @@ -2359,6 +2359,7 @@
|%
++ blake3
=<
=< hash :: cuter API
=+ [cv=iv flags=0b0]
^? |%
::
Expand All @@ -2367,7 +2368,7 @@
++ keyed |=(key=byts .(cv dat.key, flags f-keyedhash))
::
++ hash
|= [msg=byts out=@ud]
|= [out=@ud msg=byts]
^- @ux
%+ xof out
%- root-output
Expand Down
4 changes: 2 additions & 2 deletions tests/sys/zuse/crypto/blake.hoon
Expand Up @@ -103,10 +103,10 @@
;: weld
%+ expect-eq
!> `@ux`res
!> `@ux`(hash:blake3 msg out)
!> `@ux`(blake3 out msg)
%+ expect-eq
!> `@ux`keyres
!> `@ux`(hash:keyed msg out)
!> `@ux`(keyed out msg)
==
::
++ blake3-test-msg
Expand Down

0 comments on commit 14645b7

Please sign in to comment.