liminal-server 0.28.7

Standalone server for the liminal messaging bus
Documentation
//! No credential byte in the `Debug` of a crash repository row (LIM-010 R1).
//! Pinned here because the rows are private to the repository.

use super::{StoredBindingEpoch, StoredEnrollmentAllocation, StoredEnrollmentRequest, StoredU128};
use crate::credential_debug_tests::{shows_none_of, token_shaped};

#[test]
fn a_crash_repository_enrollment_request_debug_shows_no_token_byte() {
    let token = token_shaped::<16>(16);
    let request = StoredEnrollmentRequest {
        conversation_id: 1,
        token,
    };
    shows_none_of(&request, &token);
}

#[test]
fn a_crash_repository_enrollment_allocation_debug_shows_no_secret_byte() {
    let secret = token_shaped::<32>(32);
    let allocation = StoredEnrollmentAllocation {
        attach_secret: secret,
        origin_binding_epoch: StoredBindingEpoch {
            server_incarnation: 1,
            connection_ordinal: 2,
            capability_generation: 3,
        },
        attached_transaction_order: 4,
        attached_delivery_seq: 5,
        receipt_expires_at: StoredU128([6; 16]),
        provenance_expires_at: StoredU128([7; 16]),
        enrollment_fingerprint: [8; 32],
    };
    shows_none_of(&allocation, &secret);
}