Skip to content

Commit

Permalink
Update includes and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tgross35 committed Oct 22, 2023
1 parent f7d2b21 commit 1fcb423
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,6 @@ jobs:
components: rustfmt
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --all -- --check
- uses: actions/setup-python@v3
- name: Validate pre-commit
uses: pre-commit/action@v3.0.0

doc:
name: docs
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
**/target
**.out
test-c/build/
**/build
5 changes: 0 additions & 5 deletions a.rs

This file was deleted.

15 changes: 15 additions & 0 deletions rcrypto-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,14 @@ macro_rules! aead_interface {
$encrypt_ad_fn(msg, mlen, mac, nonce, key, 0xdeadbeef as *const u8, 0)
}


#[doc = concat!(" Encrypt a message using the ", $name, " algorithm with additional data")]
/// (any data that gets added to the MAC input).
///
/// # Safety
///
#[doc = concat!("Safety requirements are the same as [`", stringify!($encrypt_fn), "`],")]
/// with the additional requirement that `*ad` is valid for `adlen`.
#[doc = concat!("cbindgen: ptrs-as-arrays=[[mac;",
stringify!($macbytes), "], [nonce;",
stringify!($noncebytes), "], [key;",
Expand Down Expand Up @@ -177,6 +185,13 @@ macro_rules! aead_interface {
$decrypt_ad_fn(msg, mlen, mac, nonce, key, 0xdeadbeef as *const u8, 0)
}

#[doc = concat!(" Decrypt a message using the ", $name, " algorithm with additional data")]
/// (any data that gets added to the MAC input).
///
/// # Safety
///
#[doc = concat!("Safety requirements are the same as [`", stringify!($decrypt_fn), "`],")]
/// with the additional requirement that `*ad` is valid for `adlen`.
#[doc = concat!("cbindgen: ptrs-as-arrays=[[mac;",
stringify!($macbytes), "], [nonce;",
stringify!($noncebytes), "], [key;",
Expand Down
Binary file removed rcrypto-sys/tests/build/c-build/unity_framework.o
Binary file not shown.

0 comments on commit 1fcb423

Please sign in to comment.