/** * Encrypt master password * * @param pw the password to encrypt * @return the encrypted password * @throws MasterPasswordUnavailableException if encryption fails */ private static byte[] encryptPassword(String pw) throws MasterPasswordUnavailableException { assert SystemInfo.isWindows; return WindowsCryptUtils.protect(EncryptionUtil.getUTF8Bytes(pw)); }