Enum Class Parameter

java.lang.Object
java.lang.Enum<Parameter>
net.messagevortex.asn1.encryption.Parameter
All Implemented Interfaces:
Serializable, Comparable<Parameter>, Constable

public enum Parameter extends Enum<Parameter> implements Serializable

Enumeration of all supported Parameters.

  • Enum Constant Details

    • ALGORITHM

      public static final Parameter ALGORITHM
    • KEYSIZE

      public static final Parameter KEYSIZE
    • CURVETYPE

      public static final Parameter CURVETYPE
    • IV

      public static final Parameter IV
    • NONCE

      public static final Parameter NONCE
    • MODE

      public static final Parameter MODE
    • PADDING

      public static final Parameter PADDING
    • BLOCKSIZE

      public static final Parameter BLOCKSIZE
  • Method Details

    • values

      public static Parameter[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Parameter valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • getById

      public static Parameter getById(int id)

      Retrieve parameter by ASN.1 id.

      Parameters:
      id - the ASN.1 id
      Returns:
      the apropriate parameter or null if an illegal nuber is provided
    • getByString

      public static Parameter getByString(String s)

      Retrieve parameter by name.

      Parameters:
      s - the name to be looked up
      Returns:
      the apropriate parameter or null if an illegal name is provided
    • getId

      public int getId()

      Retrieve the ASN.1 id of the parameter.

      Returns:
      the numeric ASN.1 id
    • isEncodable

      public boolean isEncodable()

      Check if Parameter may be encoded in an ASN.1 file.

      Returns:
      true if parameter is valid for encoding in ASN.1 structure
    • fromAsn1Object

      public String fromAsn1Object(org.bouncycastle.asn1.ASN1Object o)

      Create string representation from ASN.1 object.

      Parameters:
      o - the object to be decoded
      Returns:
      a string representation of the parameter
    • toAsn1Object

      public org.bouncycastle.asn1.ASN1Encodable toAsn1Object(String s)

      Encode the string representation into the ASN.1 equivalent.

      Parameters:
      s - the string representation of the parameter content
      Returns:
      the ASN.1 representation of the parameter
    • toString

      public String toString()

      Retrieve the name of the parameter.

      Overrides:
      toString in class Enum<Parameter>
      Returns:
      the name