Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
radu committed May 19, 2024
1 parent acea791 commit e2fc0e6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions examples/internal_ring.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use ring::aead::{Aad, CHACHA20_POLY1305, LessSafeKey, Nonce, UnboundKey};
use ring::aead::{Aad, LessSafeKey, Nonce, UnboundKey, CHACHA20_POLY1305};

fn main() {
let key = [42; 32];
Expand All @@ -11,11 +11,12 @@ fn main() {

// encoding
let nonce = Nonce::assume_unique_for_key(nonce_data);
key.seal_in_place_append_tag(nonce, Aad::empty(), &mut data).unwrap();
key.seal_in_place_append_tag(nonce, Aad::empty(), &mut data)
.unwrap();
println!("{data:?}");

// decoding
let nonce = Nonce::assume_unique_for_key(nonce_data);
let data = key.open_in_place(nonce, Aad::empty(), &mut data).unwrap();
println!("{data:?}");
}
}

0 comments on commit e2fc0e6

Please sign in to comment.