The secret_key parameter especially can contain non-ascii characters and will throw an error if such a string is passed as a byte str. Potential fix for #13303