private boolean isEncryptedPassword(String password) {
    return password != null && password.startsWith(Encryptor.ENCRYPTED_PROPERTY_PREFIX); // assuming previous encryption by this class
  }
A common base class for various encryptor implementations
ambari-server/src/main/java/org/apache/ambari/server/security/encryption/PropertiesEncryptor.java