Skip to content

Commit

Permalink
Merge pull request #285 from LENS-energie/master
Browse files Browse the repository at this point in the history
Add wrapper for crypto_core_hchacha20
  • Loading branch information
jedisct1 committed Sep 17, 2021
2 parents 23638ab + 55e6fe1 commit f68bf71
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions wrapper/symbols/crypto_core_hchacha20.json
@@ -0,0 +1,36 @@
{
"name": "crypto_core_hchacha20",
"type": "function",
"inputs": [
{
"name": "input",
"type": "buf",
"length": "libsodium._crypto_core_hchacha20_inputbytes()"
},
{
"name": "privateKey",
"type": "buf",
"length": "libsodium._crypto_core_hchacha20_keybytes()"
},
{
"name": "constant",
"type": "unsized_buf_optional",
"length": "libsodium._crypto_core_hchacha20_constbytes()"
}
],
"outputs": [
{
"name": "hash",
"type": "buf",
"length": "libsodium._crypto_core_hchacha20_outputbytes()"
}
],
"target": "libsodium._crypto_core_hchacha20(hash_address, input_address, privateKey_address, constant_address) | 0",
"assert_retval": [
{
"condition": "=== 0",
"or_else_throw": "invalid usage"
}
],
"return": "_format_output(hash, outputFormat)"
}

0 comments on commit f68bf71

Please sign in to comment.