Expand description
§Overview
argonautica-c is a C/C++ wrapper for argonautica.
§Installation
- Install Rust (version 1.26.0 or higher)
- See here for instructions
- Install LLVM/Clang (version 3.9 or higher)
- Clone the argonautica repository
git clone https://github.com/bcmyers/argonautica.gitcd argonauticagit submodule initgit submodule update
- Build the library using Cargo
cargo build --release --features="simd", orcargo build --release
- Use the library
- The library, which will be called
libargonautica_c.dylibor something similar (depending on your OS), will be in the./target/releasedirectory - The header file, which will be called
argonautica.h, will be in the./argonautica-c/includedirectory
- The library, which will be called
§License
argonautica-c is licensed under either of:
at your option.
Enums§
- argonautica_
backend_ t - Available backends
- argonautica_
error_ t - Argonautica errors
- argonautica_
variant_ t - Available argon2 variants
- argonautica_
version_ t - Available argon2 versions
Functions§
- argonautica_
encoded_ len - Function that returns the length of a string-encoded hash (in bytes and including the NULL byte). If an error occurrs, the function returns -1
- argonautica_
error_ msg - Given an
argonautica_error_t, this function will return an error message as a staticchar* - argonautica_
hash - Function that hashes a password. It will modify the provided
encodedbuffer and return anargonautica_error_tindicating whether or not the hash was successful. - argonautica_
verify - Function that verifies a password against a hash. It will modify the provided
is_validint and return anargonautica_error_tindicating whether or not the verification was successful.