DefaultSecretKeySizeProvider (Bouncy Castle Library 1.54 API Specification)
Date: 2015-12-29

org.bouncycastle.operator

## Class DefaultSecretKeySizeProvider

- java.lang.Object
- - org.bouncycastle.operator.DefaultSecretKeySizeProvider

- All Implemented Interfaces:
    SecretKeySizeProvider

      public class DefaultSecretKeySizeProvider
      extends java.lang.Object
      implements SecretKeySizeProvider

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static SecretKeySizeProvider` | `INSTANCE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultSecretKeySizeProvider()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getKeySize(org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithmIdentifier)`
    `int` | `getKeySize(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm)` Return the key size implied by the OID, if one exists.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### INSTANCE

          public static final SecretKeySizeProvider INSTANCE

  - ### Constructor Detail

    - #### DefaultSecretKeySizeProvider

          public DefaultSecretKeySizeProvider()

  - ### Method Detail

    - #### getKeySize

          public int getKeySize(org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithmIdentifier)

      Specified by:
        `getKeySize` in interface `SecretKeySizeProvider`

    - #### getKeySize

          public int getKeySize(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm)

      Description copied from interface: `SecretKeySizeProvider`
      Return the key size implied by the OID, if one exists.
      Specified by:
        `getKeySize` in interface `SecretKeySizeProvider`
      Parameters:
        `algorithm` - the OID of the algorithm of interest.
      Returns:
        -1 if there is no fixed key size associated with the OID, or more information is required.