summaryrefslogtreecommitdiffstats
path: root/vendor/openssl-sys/src/handwritten/poly1305.rs
blob: 8ff22f3580d39733361af133b21cf1a7c80fae31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use super::super::*;
use libc::*;

cfg_if! {
    if #[cfg(libressl)] {
        #[repr(C)]
        #[derive(Debug, Copy, Clone)]
        pub struct poly1305_context {
            pub aligner: usize,
            pub opaque: [::libc::c_uchar; 136usize],
        }
        pub type poly1305_state = poly1305_context;
        extern "C" {
            pub fn CRYPTO_poly1305_init(ctx: *mut poly1305_context, key: *const ::libc::c_uchar);
            pub fn CRYPTO_poly1305_update(
                ctx: *mut poly1305_context,
                in_: *const ::libc::c_uchar,
                len: usize,
            );
            pub fn CRYPTO_poly1305_finish(ctx: *mut poly1305_context, mac: *mut ::libc::c_uchar);
        }
    }
}