Package java.security

Class KeyStore.PasswordProtection

    • Constructor Detail

      • PasswordProtection

        public PasswordProtection​(char[] password)
        Constructs a new instance of PasswordProtection with a password. A copy of the password is stored in the new PasswordProtection object.
        Parameters:
        password - the password, maybe null.
    • Method Detail

      • getPassword

        public char[] getPassword()
        Returns the password.
        Returns:
        the password.
        Throws:
        IllegalStateException - if the password has been destroyed.
      • isDestroyed

        public boolean isDestroyed()
        Indicates whether the password is invalidated.
        Specified by:
        isDestroyed in interface Destroyable
        Returns:
        true if the password is invalidated, false otherwise.