Skip to content

Commit 060ee3a

Browse files
authored
Improve tests with custom AAD (#34)
1 parent 1ecae7d commit 060ee3a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/plug/crypto/message_encryptor_test.exs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ defmodule Plug.Crypto.MessageEncryptorTest do
1313
data = <<0, "hełłoworld", 0>>
1414
encrypted = ME.encrypt(<<0, "hełłoworld", 0>>, "right aad", @right, @right)
1515

16-
decrypted = ME.decrypt(encrypted, @wrong, @wrong)
16+
decrypted = ME.decrypt(encrypted, "right aad", @wrong, @wrong)
1717
assert decrypted == :error
1818

19-
decrypted = ME.decrypt(encrypted, @right, @wrong)
19+
decrypted = ME.decrypt(encrypted, "right aad", @right, @wrong)
2020
assert decrypted == :error
2121

22-
decrypted = ME.decrypt(encrypted, @wrong, @right)
22+
decrypted = ME.decrypt(encrypted, "right aad", @wrong, @right)
2323
assert decrypted == :error
2424

2525
decrypted = ME.decrypt(encrypted, "wrong aad", @right, @right)

0 commit comments

Comments
 (0)