Function curve25519_dalek::subtle::byte_is_nonzero
[−]
[src]
pub fn byte_is_nonzero(b: u8) -> u8
Test if a byte is non-zero in constant time.
let mut x: u8; x = 0; assert!(byte_is_nonzero(x)); x = 3; assert!(byte_is_nonzero(x) == 1);
Return
- If b != 0, returns 1u8.
- If b == 0, returns 0u8.