File: crypto_aead_xchacha20poly1305_ietf.rs

package info (click to toggle)
rust-libsodium-sys 0.2.7-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 420 kB
  • sloc: makefile: 10; ansic: 1
file content (24 lines) | stat: -rw-r--r-- 875 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// crypto_aead_xchacha20poly1305.h

use libsodium_sys::*;

#[test]
fn test_crypto_aead_xchacha20poly1305_ietf_keybytes() {
    assert!(unsafe { crypto_aead_xchacha20poly1305_ietf_keybytes() as usize } ==
            crypto_aead_xchacha20poly1305_ietf_KEYBYTES)
}
#[test]
fn test_crypto_aead_xchacha20poly1305_ietf_nsecbytes() {
    assert!(unsafe { crypto_aead_xchacha20poly1305_ietf_nsecbytes() as usize } ==
            crypto_aead_xchacha20poly1305_ietf_NSECBYTES)
}
#[test]
fn test_crypto_aead_xchacha20poly1305_ietf_npubbytes() {
    assert!(unsafe { crypto_aead_xchacha20poly1305_ietf_npubbytes() as usize } ==
            crypto_aead_xchacha20poly1305_ietf_NPUBBYTES)
}
#[test]
fn test_crypto_aead_xchacha20poly1305_ietf_abytes() {
    assert!(unsafe { crypto_aead_xchacha20poly1305_ietf_abytes() as usize } ==
            crypto_aead_xchacha20poly1305_ietf_ABYTES)
}