code: public KeePassFile openDatabase(String password) {
          if (password == null) {
              throw new IllegalArgumentException(MSG_EMPTY_MASTER_KEY);
          }
  
          try {
              byte[] passwordBytes = password.getBytes(UTF_8);
              byte[] hashedPassword = Sha256.hash(passwordBytes);
  
              return new KeePassDatabaseReader(keepassHeader).decryptAndParseDatabase(hashedPassword, keepassFile);
          } catch (UnsupportedEncodingException e) {
              throw new UnsupportedOperationException(MSG_UTF8_NOT_SUPPORTED, e);
          }
      }
docs: Opens a KeePass database with the given password and returns the
  KeePassFile for further processing.
  <p>
  If the database cannot be decrypted with the provided password an
  exception will be thrown.
  
  @param password
  the password to open the database
  @return a KeePassFile
  @see KeePassFile