Once this is in I will start another PR with discussion about using UTF8 strings for passphrases (as is used elsewhere in the file) as I'm not sure we should be doing it like that.