-
-
Notifications
You must be signed in to change notification settings - Fork 749
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose Poly1305 bindings on libressl and boringssl
- Loading branch information
1 parent
50787ed
commit d900a18
Showing
4 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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); | ||
} | ||
} | ||
} |