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),