Skip to main content

extrapaytr_crypto/
lib.rs

1//! Digest, HMAC, encoding, and constant-time comparison primitives shared
2//! by ExtraPayTR provider adapters. This crate has no knowledge of any
3//! specific provider's protocol.
4#![cfg_attr(test, allow(clippy::unwrap_used, clippy::expect_used, clippy::panic))]
5
6pub mod compare;
7pub mod digest;
8pub mod encoding;
9pub mod hmac_sha;
10/// At-rest sealing for values an application must persist — card-on-file
11/// tokens above all. Behind the `sealing` feature, and unrelated to
12/// request signing, which is what the rest of this crate covers.
13#[cfg(feature = "sealing")]
14pub mod seal;
15
16pub use compare::constant_time_eq;
17pub use digest::{sha1, sha256, sha512};
18pub use encoding::{Base64DecodeError, base64_decode, base64_encode, hex_lower, hex_upper};
19pub use hmac_sha::{CryptoError, hmac_sha256, hmac_sha512};
20#[cfg(feature = "sealing")]
21pub use seal::{SealError, SealingKey};