Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding missing methods : bin2hex, hex2bin and compare #118

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion jni/sodium.i
Original file line number Diff line number Diff line change
Expand Up @@ -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);
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);