1 // Copyright 2023, The Android Open Source Project 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 //! Safe wrappers around the BoringSSL API. 16 17 #![cfg_attr(not(feature = "std"), no_std)] 18 #![warn(clippy::or_fun_call)] 19 20 extern crate alloc; 21 22 mod aead; 23 mod cbb; 24 mod cbs; 25 mod curve25519; 26 mod digest; 27 mod ec_key; 28 mod err; 29 mod evp; 30 mod hkdf; 31 mod hmac; 32 mod rand; 33 mod sha; 34 mod util; 35 36 pub use bssl_avf_error::{ApiName, CipherError, EcError, EcdsaError, Error, ReasonCode, Result}; 37 38 pub use aead::{Aead, AeadContext, AES_GCM_NONCE_LENGTH}; 39 pub use cbb::CbbFixed; 40 pub use cbs::Cbs; 41 pub use curve25519::ed25519_verify; 42 pub use digest::Digester; 43 pub use ec_key::{EcKey, ZVec}; 44 pub use evp::{PKey, PKeyType}; 45 pub use hkdf::hkdf; 46 pub use hmac::hmac_sha256; 47 pub use rand::rand_bytes; 48 pub use sha::sha256; 49