riptering 0.7.0

Maintained fork of kryptering: cryptographic operations with RustCrypto or AWS-LC software providers and PKCS#11 HSM backends
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
#![cfg(feature = "fips")]

use riptering::{backend_info, supports, Error, FipsStatus, Operation};

#[test]
fn cryptography_fails_closed_before_explicit_initialization() {
    let info = backend_info().expect("compile-time provider information");
    assert_eq!(info.fips, FipsStatus::Uninitialized);

    let error = supports(Operation::Random).expect_err("FIPS use before initialization must fail");
    assert!(matches!(error, Error::BackendNotInitialized { .. }));
}