Enum RSAKeySize

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<RSAKeySize>

    public enum RSAKeySize
    extends java.lang.Enum<RSAKeySize>
    RSA key size enumerator
    Author:
    Ruslan Nazirov
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      RSA1024
      1024-bytes key
      RSA2048
      2048-bytes key [Preffered]
      RSA4096
      4096-bytes key [Can be slow]
      RSA8192
      8192-bytes key [Even slower]
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getValue()
      Get key size
      static RSAKeySize valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static RSAKeySize[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • RSA1024

        public static final RSAKeySize RSA1024
        1024-bytes key
      • RSA2048

        public static final RSAKeySize RSA2048
        2048-bytes key [Preffered]
      • RSA4096

        public static final RSAKeySize RSA4096
        4096-bytes key [Can be slow]
      • RSA8192

        public static final RSAKeySize RSA8192
        8192-bytes key [Even slower]
    • Method Detail

      • values

        public static RSAKeySize[] 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 (RSAKeySize c : RSAKeySize.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static RSAKeySize valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getValue

        public int getValue()
        Get key size
        Returns:
        keySize Key size