#![warn(missing_docs)]
#![allow(clippy::redundant_field_names)]
#![allow(clippy::module_inception)]
extern crate libc;
extern crate nettle_sys;
extern crate getrandom;
mod errors;
pub use crate::errors::{Error, Result};
mod helper;
pub mod hash;
pub mod cipher;
pub mod mode;
pub mod aead;
pub mod mac;
pub mod kdf;
pub mod rsa;
pub mod random;
pub mod ecc;
pub mod curve25519;
pub mod curve448;
pub mod dsa;
pub mod ecdh;
pub mod ecdsa;
pub mod ed25519;
pub mod ed448;
pub fn version() -> (u32, u32) {
let (major, minor) = unsafe {
(nettle_sys::nettle_version_major(),
nettle_sys::nettle_version_minor())
};
use std::convert::TryInto;
(major.try_into().unwrap_or(0), minor.try_into().unwrap_or(0))
}