byte-array-ops 0.4.0

A no_std-compatible library for security-by-default byte array operations. Includes automatic memory zeroization, constant-time utilities, multiple input formats (hex, binary, UTF-8), bitwise operations, and comprehensive type conversions with minimal dependencies.
Documentation
1
2
3
4
5
6
7
8
9
10
use crate::ByteArray;
use subtle::ConstantTimeEq;

impl PartialEq for ByteArray {
    fn eq(&self, other: &Self) -> bool {
        self.as_bytes().ct_eq(other.as_bytes()).unwrap_u8() == 1
    }
}

impl Eq for ByteArray {}