/**
  * Decrypt master password
  *
  * @param pw the password to decrypt
  * @return the decrypted password
  * @throws MasterPasswordUnavailableException if decryption fails
  */
 private static String decryptPassword(byte[] pw) throws MasterPasswordUnavailableException {
   assert SystemInfo.isWindows;
   try {
     return new String(WindowsCryptUtils.unprotect(pw), "UTF-8");
   } catch (UnsupportedEncodingException e) {
     throw new IllegalStateException("UTF-8 not available", e);
   }
 }