floe_rs/lib.rs
1// Copyright 2026 Damir Jelić, Snowflake Inc.
2// SPDX-License-Identifier: Apache-2.0
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16#![cfg_attr(not(feature = "std"), no_std)]
17
18// TODO: Add the higher level public streaming/online functions
19// https://github.com/Snowflake-Labs/floe-specification/blob/main/spec/README.md#public-streamingonline-function
20
21// TODO: Add methods where the user doesn't need to allocate buffers manually.
22
23// TODO: Allow the AEAD_ROTATION_MASK to be overridden.
24
25mod keys;
26mod result;
27mod traits;
28mod utils;
29
30#[cfg(feature = "floe-gcm")]
31pub mod gcm;
32pub mod random_access;
33pub mod types;
34
35pub use crate::{
36 result::{DecryptionError, EncryptionError, HeaderDecodeError, SegmentDecodeError},
37 traits::{FloeAead, FloeKdf},
38};
39
40#[cfg(all(test, feature = "std", feature = "floe-gcm", feature = "getrandom"))]
41mod tests;