From: Markus Triska Date: Tue, 19 May 2020 14:56:34 +0000 (+0200) Subject: correct option processing in crypto_data_decrypt/6 X-Git-Tag: v0.8.123~11^2~3 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=da4d061067d9f51e3a48c488bb5772d9fe926e24;p=scryer-prolog.git correct option processing in crypto_data_decrypt/6 --- diff --git a/src/prolog/lib/crypto.pl b/src/prolog/lib/crypto.pl index 0df0dbd7..bf613603 100644 --- a/src/prolog/lib/crypto.pl +++ b/src/prolog/lib/crypto.pl @@ -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),