From 88f7b717f2929a7c7ed96ef3088534502da9ddbc Mon Sep 17 00:00:00 2001 From: nico-dangerous Date: Wed, 29 Aug 2018 03:20:24 -0400 Subject: [PATCH] Adding missing methods : bin2hex, hex2bin and compare --- jni/sodium.i | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/jni/sodium.i b/jni/sodium.i index 3478c38..c8f26c1 100644 --- a/jni/sodium.i +++ b/jni/sodium.i @@ -1629,4 +1629,18 @@ int crypto_box_curve25519xchacha20poly1305_seal_open(unsigned char *m, const unsigned char *c, unsigned long long clen, const unsigned char *pk, - const unsigned char *sk); \ No newline at end of file + const unsigned char *sk); + +char * sodium_bin2hex(char *const hex, + const size_t hex_maxlen, + const unsigned char *const bin, + const size_t bin_len); + +int +sodium_hex2bin(unsigned char *const bin, const size_t bin_maxlen, + const char *const hex, const size_t hex_len, + const char *const ignore, size_t *const bin_len, + const char **const hex_end); + +int +sodium_compare(const unsigned char *b1_, const unsigned char *b2_, size_t len);