tezos-crypto
Tezos: library with all the cryptographic primitives used by Tezos
1024" x-on:close-sidebar="sidebar=window.innerWidth > 1024 && true">
package tezos-crypto
-
tezos-crypto
-
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Library tezos-crypto
- raises Invalid_argument
if argument is not
keybytes
bytes long
val genkey : unit -> key
genkey ()
generates a secretbox key.
secretbox key nonce msg cmsg
encrypts and authenticates the data in msg
using key
and nonce
and outputs the authentication tag and the ciphertext in one buffer cmsg
. For this reason, csmg
needs to be tagbytes
longer than msg
.
secretbox_open key nonce cmsg msg
verifies and decrypts cmsg
using key
and nonce
and outputs the plaintext in msg
. As above, msg
is expected to be tagbytes
shorter than cmsg
. Returns true if operation has succeeded, false otherwise.
ON THIS PAGE
No table of contents