blob: 686abf9f3eefea11523390c75deaed5a38aaba45 [file] [log] [blame]
Alice Wangc8f88f52023-09-25 14:02:17 +00001// 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 Wangdbdac102024-03-25 08:01:32 +000018#![warn(clippy::or_fun_call)]
Alice Wangc8f88f52023-09-25 14:02:17 +000019
Alice Wangb3fcf632023-09-26 08:32:55 +000020extern crate alloc;
21
Alice Wang69b088f2023-09-27 12:54:05 +000022mod aead;
Alice Wangc8f88f52023-09-25 14:02:17 +000023mod cbb;
Alice Wang000595b2023-10-02 13:46:45 +000024mod cbs;
Alice Wang3397b362023-12-01 13:57:10 +000025mod curve25519;
Alice Wang709cce92023-09-26 10:30:21 +000026mod digest;
Alice Wangb3fcf632023-09-26 08:32:55 +000027mod ec_key;
Alice Wang47287e72023-09-29 13:14:33 +000028mod err;
Alice Wang600ea5b2023-11-17 15:12:16 +000029mod evp;
Alice Wangf1a83b02023-09-26 12:39:17 +000030mod hkdf;
Alice Wang709cce92023-09-26 10:30:21 +000031mod hmac;
Alice Wang8b8e6e62023-10-02 09:10:13 +000032mod rand;
Alice Wang0271ee02023-11-15 15:03:42 +000033mod sha;
Alice Wang815d3682023-09-28 08:30:40 +000034mod util;
Alice Wangc8f88f52023-09-25 14:02:17 +000035
Alice Wang0271ee02023-11-15 15:03:42 +000036pub use bssl_avf_error::{ApiName, CipherError, EcError, EcdsaError, Error, ReasonCode, Result};
Alice Wang47287e72023-09-29 13:14:33 +000037
Alice Wang78b35f82023-10-06 11:57:35 +000038pub use aead::{Aead, AeadContext, AES_GCM_NONCE_LENGTH};
Alice Wangc8f88f52023-09-25 14:02:17 +000039pub use cbb::CbbFixed;
Alice Wang000595b2023-10-02 13:46:45 +000040pub use cbs::Cbs;
Alice Wang3397b362023-12-01 13:57:10 +000041pub use curve25519::ed25519_verify;
Alice Wangf1a83b02023-09-26 12:39:17 +000042pub use digest::Digester;
Alice Wangb3fcf632023-09-26 08:32:55 +000043pub use ec_key::{EcKey, ZVec};
Alice Wang7468ae42023-11-30 10:20:36 +000044pub use evp::{PKey, PKeyType};
Alice Wangf1a83b02023-09-26 12:39:17 +000045pub use hkdf::hkdf;
Alice Wang709cce92023-09-26 10:30:21 +000046pub use hmac::hmac_sha256;
Alice Wang8b8e6e62023-10-02 09:10:13 +000047pub use rand::rand_bytes;
Alice Wang0271ee02023-11-15 15:03:42 +000048pub use sha::sha256;