Skip to content

Commit

Permalink
Add: SHA512
Browse files Browse the repository at this point in the history
  • Loading branch information
Kraemii authored and nichtsfrei committed May 6, 2022
1 parent 27a36a4 commit 09e7f95
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions nasl/nasl_crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@ nasl_sha256 (lex_ctxt *lexic)
return nasl_hash (lexic, GCRY_MD_SHA256);
}

tree_cell *
nasl_sha512 (lex_ctxt *lexic)
{
return nasl_hash (lexic, GCRY_MD_SHA512);
}

tree_cell *
nasl_ripemd160 (lex_ctxt *lexic)
{
Expand Down
3 changes: 3 additions & 0 deletions nasl/nasl_crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ nasl_sha1 (lex_ctxt *);
tree_cell *
nasl_sha256 (lex_ctxt *);

tree_cell *
nasl_sha512 (lex_ctxt *);

tree_cell *
nasl_ripemd160 (lex_ctxt *);

Expand Down
1 change: 1 addition & 0 deletions nasl/nasl_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ static init_func libfuncs[] = {
{"MD5", nasl_md5},
{"SHA1", nasl_sha1},
{"SHA256", nasl_sha256},
{"SHA512", nasl_sha512},
{"RIPEMD160", nasl_ripemd160},
{"HMAC_MD2", nasl_hmac_md2},
{"HMAC_MD5", nasl_hmac_md5},
Expand Down

0 comments on commit 09e7f95

Please sign in to comment.