ncryptf-rs 0.5.7

Secure API authentication and end to end encryption.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use dryoc::constants::{CRYPTO_BOX_PUBLICKEYBYTES, CRYPTO_BOX_SECRETKEYBYTES};
use ncryptf::*;

#[test]
fn test_get_keypair_sk() {
    let kp = Keypair::new();
    assert!(kp.get_secret_key().len() == (CRYPTO_BOX_SECRETKEYBYTES as usize));
}

#[test]
fn test_get_keypair_pk() {
    let kp = Keypair::new();
    assert!(kp.get_public_key().len() == (CRYPTO_BOX_PUBLICKEYBYTES as usize));
}