Skip to main content

Crate oxicrypto_adapter_aws_lc

Crate oxicrypto_adapter_aws_lc 

Source
Expand description

oxicrypto-adapter-aws-lc — OxiCrypto adapter backed by aws-lc-rs.

This crate exposes no types by default. Enable the aws-lc feature to activate the AEAD, signature, hash, HKDF, and HMAC implementations backed by the FIPS-validated aws-lc-rs library.

§Feature flags

FlagDefaultDescription
aws-lcoffEnable aws-lc-rs backed implementations.

§Example

use oxicrypto_adapter_aws_lc::aead::AwsLcAead;
use oxicrypto_core::Aead;

let cipher = AwsLcAead::aes256_gcm();
let key = vec![0u8; cipher.key_len()];
let nonce = vec![0u8; cipher.nonce_len()];
let mut ct = vec![0u8; 0 + cipher.tag_len()];
cipher.seal(&key, &nonce, b"", b"", &mut ct).expect("seal ok");