Skip to content

Commit

Permalink
allow access to SecretBox.nonce (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm authored Aug 17, 2024
1 parent e0b088b commit 1c52706
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion secret_box.v
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ pub const public_key_size = 32 // int(C.crypto_secretbox_PUBLICKEYBYTES)
pub const secret_key_size = 32 // int(C.crypto_secretbox_PUBLICKEYBYTES)

pub struct SecretBox {
nonce [24]u8
mut:
key [32]u8
pub:
nonce [24]u8
}

pub fn new_secret_box(key string) SecretBox {
Expand Down

0 comments on commit 1c52706

Please sign in to comment.