org.bouncycastle.asn1.x509

## Class AltSignatureAlgorithm

- java.lang.Object
- - org.bouncycastle.asn1.ASN1Object
  - - org.bouncycastle.asn1.x509.AltSignatureAlgorithm

- All Implemented Interfaces:
    ASN1Encodable, Encodable

      public class AltSignatureAlgorithm
      extends ASN1Object

  X.509 Section 9.8.3.
  This extension may be used as a public-key certificate extension, a CRL extension or an AVL extension. It shall contain the algorithm identifier for the alternative digital signature algorithm used by the signer when creating an alternative digital signature and by the relying party when validating the alternative digital signature.

       altSignatureAlgorithm EXTENSION ::= {
           SYNTAX AltSignatureAlgorithm
           IDENTIFIED BY id-ce-altSignatureAlgorithm }

       AltSignatureAlgorithm ::= AlgorithmIdentifier{{SupportedAlgorithms}}

  When the altSignatureAlgorithm extension is included in a particular value that is an instance of a data type that supports extensions, the altSignatureValue extension shall also be included.
  NOTE 1 – By having a separate altSignatureAlgorithm extension, instead of having it combined with the altSignatureValue extension, the alternative digital signature algorithm is protected by the alternative signature. This extension may be flagged either as critical or as non-critical.
  NOTE 2 – It is recommended that it be flagged as non-critical. Flagging it as critical would require all relying parties to understand the extension and the alternative public-key algorithms

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AltSignatureAlgorithm(AlgorithmIdentifier algorithm)`
    `AltSignatureAlgorithm(ASN1ObjectIdentifier algorithm)`
    `AltSignatureAlgorithm(ASN1ObjectIdentifier algorithm, ASN1Encodable parameters)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static AltSignatureAlgorithm` | `fromExtensions(Extensions extensions)`
    `AlgorithmIdentifier` | `getAlgorithm()` Return the algorithm identifier representing the alternate signature algorithm used to generate the alternate signature algorithm value extension.
    `static AltSignatureAlgorithm` | `getInstance(ASN1TaggedObject obj, boolean explicit)`
    `static AltSignatureAlgorithm` | `getInstance(java.lang.Object obj)`
    `ASN1Primitive` | `toASN1Primitive()` Method providing a primitive representation of this object suitable for encoding.

    - ### Methods inherited from class org.bouncycastle.asn1.ASN1Object

      `encodeTo, encodeTo, equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode`

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

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

- - ### Constructor Detail

    - #### AltSignatureAlgorithm

          public AltSignatureAlgorithm(AlgorithmIdentifier algorithm)

    - #### AltSignatureAlgorithm

          public AltSignatureAlgorithm(ASN1ObjectIdentifier algorithm)

    - #### AltSignatureAlgorithm

          public AltSignatureAlgorithm(ASN1ObjectIdentifier algorithm,
                                       ASN1Encodable parameters)

  - ### Method Detail

    - #### getInstance

          public static AltSignatureAlgorithm getInstance(ASN1TaggedObject obj,
                                                          boolean explicit)

    - #### getInstance

          public static AltSignatureAlgorithm getInstance(java.lang.Object obj)

    - #### fromExtensions

          public static AltSignatureAlgorithm fromExtensions(Extensions extensions)

    - #### getAlgorithm

          public AlgorithmIdentifier getAlgorithm()

      Return the algorithm identifier representing the alternate signature algorithm used to generate the alternate signature algorithm value extension.
      Returns:
        alternate signature algorithm identifier.

    - #### toASN1Primitive

          public ASN1Primitive toASN1Primitive()

      Description copied from class: `ASN1Object`
      Method providing a primitive representation of this object suitable for encoding.
      Specified by:
        `toASN1Primitive` in interface `ASN1Encodable`
      Specified by:
        `toASN1Primitive` in class `ASN1Object`
      Returns:
        a primitive representation of this object.