Alice Wang | c8f88f5 | 2023-09-25 14:02:17 +0000 | [diff] [blame] | 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)] |
Alice Wang | dbdac10 | 2024-03-25 08:01:32 +0000 | [diff] [blame] | 18 | #![warn(clippy::or_fun_call)] |
Alice Wang | c8f88f5 | 2023-09-25 14:02:17 +0000 | [diff] [blame] | 19 | |
Alice Wang | b3fcf63 | 2023-09-26 08:32:55 +0000 | [diff] [blame] | 20 | extern crate alloc; |
| 21 | |
Alice Wang | 69b088f | 2023-09-27 12:54:05 +0000 | [diff] [blame] | 22 | mod aead; |
Alice Wang | c8f88f5 | 2023-09-25 14:02:17 +0000 | [diff] [blame] | 23 | mod cbb; |
Alice Wang | 000595b | 2023-10-02 13:46:45 +0000 | [diff] [blame] | 24 | mod cbs; |
Alice Wang | 3397b36 | 2023-12-01 13:57:10 +0000 | [diff] [blame] | 25 | mod curve25519; |
Alice Wang | 709cce9 | 2023-09-26 10:30:21 +0000 | [diff] [blame] | 26 | mod digest; |
Alice Wang | b3fcf63 | 2023-09-26 08:32:55 +0000 | [diff] [blame] | 27 | mod ec_key; |
Alice Wang | 47287e7 | 2023-09-29 13:14:33 +0000 | [diff] [blame] | 28 | mod err; |
Alice Wang | 600ea5b | 2023-11-17 15:12:16 +0000 | [diff] [blame] | 29 | mod evp; |
Alice Wang | f1a83b0 | 2023-09-26 12:39:17 +0000 | [diff] [blame] | 30 | mod hkdf; |
Alice Wang | 709cce9 | 2023-09-26 10:30:21 +0000 | [diff] [blame] | 31 | mod hmac; |
Alice Wang | 8b8e6e6 | 2023-10-02 09:10:13 +0000 | [diff] [blame] | 32 | mod rand; |
Alice Wang | 0271ee0 | 2023-11-15 15:03:42 +0000 | [diff] [blame] | 33 | mod sha; |
Alice Wang | 815d368 | 2023-09-28 08:30:40 +0000 | [diff] [blame] | 34 | mod util; |
Alice Wang | c8f88f5 | 2023-09-25 14:02:17 +0000 | [diff] [blame] | 35 | |
Alice Wang | 0271ee0 | 2023-11-15 15:03:42 +0000 | [diff] [blame] | 36 | pub use bssl_avf_error::{ApiName, CipherError, EcError, EcdsaError, Error, ReasonCode, Result}; |
Alice Wang | 47287e7 | 2023-09-29 13:14:33 +0000 | [diff] [blame] | 37 | |
Alice Wang | 78b35f8 | 2023-10-06 11:57:35 +0000 | [diff] [blame] | 38 | pub use aead::{Aead, AeadContext, AES_GCM_NONCE_LENGTH}; |
Alice Wang | c8f88f5 | 2023-09-25 14:02:17 +0000 | [diff] [blame] | 39 | pub use cbb::CbbFixed; |
Alice Wang | 000595b | 2023-10-02 13:46:45 +0000 | [diff] [blame] | 40 | pub use cbs::Cbs; |
Alice Wang | 3397b36 | 2023-12-01 13:57:10 +0000 | [diff] [blame] | 41 | pub use curve25519::ed25519_verify; |
Alice Wang | f1a83b0 | 2023-09-26 12:39:17 +0000 | [diff] [blame] | 42 | pub use digest::Digester; |
Alice Wang | b3fcf63 | 2023-09-26 08:32:55 +0000 | [diff] [blame] | 43 | pub use ec_key::{EcKey, ZVec}; |
Alice Wang | 7468ae4 | 2023-11-30 10:20:36 +0000 | [diff] [blame] | 44 | pub use evp::{PKey, PKeyType}; |
Alice Wang | f1a83b0 | 2023-09-26 12:39:17 +0000 | [diff] [blame] | 45 | pub use hkdf::hkdf; |
Alice Wang | 709cce9 | 2023-09-26 10:30:21 +0000 | [diff] [blame] | 46 | pub use hmac::hmac_sha256; |
Alice Wang | 8b8e6e6 | 2023-10-02 09:10:13 +0000 | [diff] [blame] | 47 | pub use rand::rand_bytes; |
Alice Wang | 0271ee0 | 2023-11-15 15:03:42 +0000 | [diff] [blame] | 48 | pub use sha::sha256; |