Crates.io | tls_codec |
lib.rs | tls_codec |
version | 0.4.1 |
source | src |
created_at | 2021-06-11 11:34:31.679088 |
updated_at | 2024-01-26 13:41:04.345863 |
description | A pure Rust implementation of the TLS (de)serialization |
homepage | |
repository | https://github.com/RustCrypto/formats/tree/master/tls_codec |
max_upload_size | |
id | 408964 |
size | 121,745 |
crates.io | docs.rs | |
---|---|---|
tls_codec | ||
tls_codec_derive |
This crate implements the TLS codec as defined in RFC 8446 as well as some extensions required by MLS.
With the derive
feature TlsSerialize
and TlsDeserialize
can be
derived.
The crate also provides the following data structures that implement TLS serialization/deserialization
u8
, u16
, u32
, u64
TlsVecU8
, TlsVecU16
, TlsVecU32
SecretTlsVecU8
, SecretTlsVecU16
, SecretTlsVecU32
The same as the TlsVec*
versions but it implements zeroize, requiring
the elements to implement zeroize as well.TlsSliceU8
, TlsSliceU16
, TlsSliceU32
are lightweight wrapper for slices
that allow to serialize them without having to create a TlsVec*
.TlsByteSliceU8
, TlsByteSliceU16
, TlsByteSliceU32
, and
TlsByteVecU8
, TlsByteVecU16
, TlsByteVecU32
are provided with optimized implementations for byte vectors.[u8; l]
, for l ∈ [1..128]
Option<T>
where T: Serialize
Option<T>
where T: Deserialize
(T, U)
and (T, U, V)
where T, U, V
implement Serialize`(T, U)
and (T, U, V)
where T, U, V
implement Deserialize`This crate requires Rust 1.60.0 at a minimum.
We may change the MSRV in the future, but it will be accompanied by a minor version bump.
Licensed under either of:
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.