Files
opaque-vx/src/tests/mod.rs
T

24 lines
710 B
Rust
Raw Normal View History

2023-05-22 23:04:26 -07:00
// Copyright (c) Meta Platforms, Inc. and affiliates.
2020-06-05 09:35:14 -07:00
//
2023-05-22 23:04:26 -07:00
// This source code is dual-licensed under either the MIT license found in the
// LICENSE-MIT file in the root directory of this source tree or the Apache
2021-12-03 14:38:11 -08:00
// License, Version 2.0 found in the LICENSE-APACHE file in the root directory
2023-05-22 23:04:26 -07:00
// of this source tree. You may select, at your option, one of the above-listed
// licenses.
2020-06-05 09:35:14 -07:00
use serde_json::Value;
use std::vec::Vec;
mod full_test;
2023-11-16 20:07:46 +01:00
#[rustfmt::skip]
2025-11-08 14:21:51 -08:00
#[allow(dead_code)]
2023-11-16 20:07:46 +01:00
mod full_test_vectors;
2020-06-05 09:35:14 -07:00
pub mod mock_rng;
mod parser;
2025-09-08 11:27:47 -07:00
mod rfc9807_vectors;
mod test_opaque_vectors;
pub(crate) fn decode(values: &Value, key: &str) -> Option<Vec<u8>> {
values[key].as_str().and_then(|s| hex::decode(s).ok())
}