Provide correctness test cases for the verification codes.

This commit is contained in:
Jesper Louis Andersen
2014-11-25 14:10:24 +01:00
parent dc78d268e6
commit f64e62d16e
2 changed files with 61 additions and 3 deletions
+11 -3
View File
@@ -19,12 +19,20 @@
]).
-export([
hash/1
hash/1,
verify_16/2,
verify_32/2
]).
hash(Bin) ->
enacl_nif:crypto_hash(Bin).
%% Low level helper functions
%% -----------------
hash(Bin) -> enacl_nif:crypto_hash(Bin).
verify_16(X, Y) -> enacl_nif:crypto_verify_16(X, Y).
verify_32(X, Y) -> enacl_nif:crypto_verify_32(X, Y).
%% Public Key Crypto
%% ---------------------
box_keypair() ->
enacl_nif:crypto_box_keypair().