bcx-core 0.4.0

Core no_std BCX identifiers, limits, and validation errors.
Documentation

bcx-core

Core identifier and validation primitives for the main bcx crate.

This crate belongs to the BCX workspace. It is published separately so the main crate can keep small internal modules and precise dependency boundaries, but it is not meant to be used as a standalone protocol product. Prefer depending on bcx unless you are working on BCX internals.

Example

use bcx_core::{Digest, StatementId, SubjectId, ZeroizedDigest};

let statement = StatementId::new(&[7; Digest::LEN]).unwrap();
let subject = SubjectId::new(b"subject:invoice:123").unwrap();
let boundary_digest = ZeroizedDigest::new(Digest::new([9; Digest::LEN]));

assert_eq!(statement.len(), Digest::LEN);
assert_eq!(subject.as_bytes(), b"subject:invoice:123");
assert_eq!(boundary_digest.as_bytes(), &[9; Digest::LEN]);

Notes

  • no_std by default.
  • Raw identifier bytes are validated before construction.
  • Debug output is intentionally redacted for byte-backed identifiers.