pw = str.encode (pw)
elif isinstance (pw, bytes) is False:
raise InvalidParameter ("password must be a string, not %s"
- % type (password))
+ % type (pw))
if isinstance (ins, io.BufferedReader) is False and \
isinstance (ins, io.FileIO) is False:
raise InvalidParameter ("file to hash must be opened in “binary” mode")