Enum RevocationAttributes.Reason

  • All Implemented Interfaces:
    Serializable, Comparable<RevocationAttributes.Reason>
    Enclosing class:
    RevocationAttributes

    public static enum RevocationAttributes.Reason
    extends Enum<RevocationAttributes.Reason>
    Reason for revocation. There are two kinds of reasons: hard and soft reason. Soft revocation reasons gracefully disable keys or user-ids. Softly revoked keys can no longer be used to encrypt data to or to generate signatures. Any signature made after a key has been soft revoked is deemed invalid. Any signature made before the key has been soft revoked stays valid. Soft revoked info can be re-certified at a later point. Hard revocation reasons on the other hand renders the key or user-id invalid immediately. Hard reasons are suitable to use if for example a key got compromised. Any signature made before or after a key has been hard revoked is no longer considered valid. Hard revoked information can also not be re-certified.
    • Method Detail

      • values

        public static RevocationAttributes.Reason[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (RevocationAttributes.Reason c : RevocationAttributes.Reason.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static RevocationAttributes.Reason valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • isHardRevocation

        public static boolean isHardRevocation​(byte code)
        Return true if the RevocationAttributes.Reason the provided code encodes is a hard revocation reason, false otherwise. Hard revocations cannot be undone, while keys or certifications with soft revocations can be re-certified by placing another signature on them.
        Parameters:
        code - reason code
        Returns:
        is hard
      • code

        public byte code()