org.bouncycastle.crypto

## Enum CryptoServicePurpose

- java.lang.Object
- - java.lang.Enum<CryptoServicePurpose>
  - - org.bouncycastle.crypto.CryptoServicePurpose

- All Implemented Interfaces:
    Serializable, Comparable<CryptoServicePurpose>

      public enum CryptoServicePurpose
      extends Enum<CryptoServicePurpose>

  Enumeration of cryptographic service purposes. Defines the intended use case for cryptographic operations.

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `AGREEMENT` Key agreement protocol
    `ANY` Any purpose
    `AUTHENTICATION` Authentication operation (for MACs and digests)
    `DECRYPTION` Decryption operation
    `ENCRYPTION` Encryption operation
    `KEYGEN` Key generation
    `PRF` Pseudo-random function
    `SIGNING` Signing operation (for signatures and digests)
    `VERIFICATION` Verification operation
    `VERIFYING` Verification operation

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static CryptoServicePurpose` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static CryptoServicePurpose[]` | `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

    - #### AGREEMENT

          public static final CryptoServicePurpose AGREEMENT

      Key agreement protocol

    - #### ANY

          public static final CryptoServicePurpose ANY

      Any purpose

    - #### AUTHENTICATION

          public static final CryptoServicePurpose AUTHENTICATION

      Authentication operation (for MACs and digests)

    - #### DECRYPTION

          public static final CryptoServicePurpose DECRYPTION

      Decryption operation

    - #### ENCRYPTION

          public static final CryptoServicePurpose ENCRYPTION

      Encryption operation

    - #### KEYGEN

          public static final CryptoServicePurpose KEYGEN

      Key generation

    - #### PRF

          public static final CryptoServicePurpose PRF

      Pseudo-random function

    - #### SIGNING

          public static final CryptoServicePurpose SIGNING

      Signing operation (for signatures and digests)

    - #### VERIFICATION

          public static final CryptoServicePurpose VERIFICATION

      Verification operation

    - #### VERIFYING

          public static final CryptoServicePurpose VERIFYING

      Verification operation

  - ### Method Detail

    - #### valueOf

          public static CryptoServicePurpose 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

    - #### values

          public static CryptoServicePurpose[] 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 (CryptoServicePurpose c : CryptoServicePurpose.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared