libsodium_sys/src/
crypto_shorthash_siphash24.rs1pub const crypto_shorthash_siphash24_BYTES: usize = 8;
4pub const crypto_shorthash_siphash24_KEYBYTES: usize = 16;
5
6
7extern {
8 pub fn crypto_shorthash_siphash24(
9 h: *mut [u8; crypto_shorthash_siphash24_BYTES],
10 m: *const u8,
11 mlen: c_ulonglong,
12 k: *const [u8; crypto_shorthash_siphash24_KEYBYTES]) -> c_int;
13 pub fn crypto_shorthash_siphash24_bytes() -> size_t;
14 pub fn crypto_shorthash_siphash24_keybytes() -> size_t;
15}
16
17
18#[test]
19fn test_crypto_shorthash_siphash24_bytes() {
20 assert!(unsafe {
21 crypto_shorthash_siphash24_bytes() as usize
22 } == crypto_shorthash_siphash24_BYTES)
23}
24#[test]
25fn test_crypto_shorthash_siphash24_keybytes() {
26 assert!(unsafe {
27 crypto_shorthash_siphash24_keybytes() as usize
28 } == crypto_shorthash_siphash24_KEYBYTES)
29}