]> Repositorios git - scryer-prolog.git/commitdiff
correct option processing in crypto_data_decrypt/6
authorMarkus Triska <[email protected]>
Tue, 19 May 2020 14:56:34 +0000 (16:56 +0200)
committerMarkus Triska <[email protected]>
Tue, 19 May 2020 15:02:33 +0000 (17:02 +0200)
src/prolog/lib/crypto.pl

index 0df0dbd7bdd124732c7cff37e7b243f763428bb8..bf61360375ade4b135a4693c3e790a4c8d49a47a 100644 (file)
@@ -592,7 +592,9 @@ crypto_data_decrypt(CipherText0, Algorithm, Key, IV, PlainText, Options) :-
         must_be_bytes(Key, crypto_data_decrypt/6),
         must_be_bytes(IV, crypto_data_decrypt/6),
         must_be(atom, Algorithm),
-        encoding_options(Encoding, Options),
+        option(encoding(Encoding), Options, utf8),
+        must_be(atom, Encoding),
+        member(Encoding, [utf8,octet]),
         must_be(list, CipherText0),
         encoding_bytes(octet, CipherText0, CipherText1),
         append(CipherText1, Tag, CipherText),