base64-ng-derive
Dependency-free derive helpers for fixed-size base64-ng byte newtypes.
This companion crate keeps the core base64-ng package free of proc-macro
dependencies. It supports one deliberately narrow shape:
use Base64Secret;
;
The generated impls provide:
from_base64(&[u8])andfrom_base64_str(&str)usingbase64_ng::ct::STANDARD.decode_slice_staged_clear_tail.encode_base64::<CAP>()using strict standard padded Base64.as_bytes(),as_mut_bytes(), andconstant_time_eq(&Self).- redacted
Debug. - drop-time cleanup through
base64_ng::clear_bytes.
The macro intentionally does not support named structs, multiple fields,
generic structs, or non-array storage. Use base64-ng-sanitization when you
want integration with a dedicated clear-on-drop secret container.