From da4d061067d9f51e3a48c488bb5772d9fe926e24 Mon Sep 17 00:00:00 2001 From: Markus Triska Date: Tue, 19 May 2020 16:56:34 +0200 Subject: [PATCH] correct option processing in crypto_data_decrypt/6 --- src/prolog/lib/crypto.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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), -- 2.54.0