1
0
forked from QPQ-AG/enoise

Update enacl dep and fix some minor details (#1)

Co-authored-by: Ulf Wiger <ulf@wiger.net>
Reviewed-on: QPQ-AG/enoise#1
This commit is contained in:
2025-03-08 00:28:12 +09:00
parent 8acbce9269
commit 479ec70870
5 changed files with 9 additions and 16 deletions
+1 -2
View File
@@ -65,8 +65,7 @@ rekey(Cipher, K) ->
-spec encrypt(Cipher :: enoise_cipher_state:noise_cipher(),
Key :: binary(), Nonce :: non_neg_integer(),
Ad :: binary(), PlainText :: binary()) ->
binary() | {error, term()}.
Ad :: binary(), PlainText :: binary()) -> binary().
encrypt('ChaChaPoly', K, N, Ad, PlainText) ->
Nonce = <<0:32, N:64/little-unsigned-integer>>,
enacl:aead_chacha20poly1305_ietf_encrypt(PlainText, Ad, Nonce, K);