Registry / serialization / serdect

serdect

JSON →
library0.4.3rscratesunverified

Constant-time serde serializer/deserializer helpers for data that potentially contains secrets (e.g., cryptographic keys).

# Cargo.toml [dependencies] serdect = "0.4.3"
INSTALL
IMPORT
SIG · SERDECT
S
serdect
serializationrustv0.4.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Serialize
use serdect::serde::Serialize;

Serializes a secret key using constant-time helpers.

use serdect::serde::{Serialize, Deserialize}; #[derive(Serialize, Deserialize)] struct SecretKey(#[serde(with = "serdect::array")] [u8; 32]); fn main() { let key = SecretKey([0u8; 32]); let json = serde_json::to_string(&key).unwrap(); println!("{}", json); }
Debug
Known issues
gotchaUsing serdect without the 'alloc' feature may cause compilation errors in no_std environments.
fix
Enable the 'alloc' feature if using no_std with an allocator.
affects: >=0.1.0
Upgrade
Version history
0.4.3latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
17 hits · last 30 days
node
14
Amazon
1
Resources
serdect — cargo add serdect · libregistry