SignedPublicKeyAndChallenge (Bouncy Castle Library 1.52 API Specification)
Date: 2015-03-01

org.bouncycastle.mozilla

## Class SignedPublicKeyAndChallenge

- java.lang.Object
- - org.bouncycastle.asn1.ASN1Object
  - - org.bouncycastle.mozilla.SignedPublicKeyAndChallenge

- All Implemented Interfaces:
    org.bouncycastle.asn1.ASN1Encodable, org.bouncycastle.util.Encodable

      public class SignedPublicKeyAndChallenge
      extends org.bouncycastle.asn1.ASN1Object

  This is designed to parse the SignedPublicKeyAndChallenge created by the KEYGEN tag included by Mozilla based browsers.

        PublicKeyAndChallenge ::= SEQUENCE {
          spki SubjectPublicKeyInfo,
          challenge IA5STRING
        }

        SignedPublicKeyAndChallenge ::= SEQUENCE {
          publicKeyAndChallenge PublicKeyAndChallenge,
          signatureAlgorithm AlgorithmIdentifier,
          signature BIT STRING
        }

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SignedPublicKeyAndChallenge(byte[] bytes)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.security.PublicKey` | `getPublicKey(java.lang.String provider)`
    `org.bouncycastle.asn1.mozilla.PublicKeyAndChallenge` | `getPublicKeyAndChallenge()`
    `org.bouncycastle.asn1.ASN1Primitive` | `toASN1Primitive()`
    `boolean` | `verify()`
    `boolean` | `verify(java.lang.String provider)`

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

      `equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode, toASN1Object`

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

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

- - ### Constructor Detail

    - #### SignedPublicKeyAndChallenge

          public SignedPublicKeyAndChallenge(byte[] bytes)

  - ### Method Detail

    - #### toASN1Primitive

          public org.bouncycastle.asn1.ASN1Primitive toASN1Primitive()

      Specified by:
        `toASN1Primitive` in interface `org.bouncycastle.asn1.ASN1Encodable`
      Specified by:
        `toASN1Primitive` in class `org.bouncycastle.asn1.ASN1Object`

    - #### getPublicKeyAndChallenge

          public org.bouncycastle.asn1.mozilla.PublicKeyAndChallenge getPublicKeyAndChallenge()

    - #### verify

          public boolean verify()
                         throws java.security.NoSuchAlgorithmException,
                                java.security.SignatureException,
                                java.security.NoSuchProviderException,
                                java.security.InvalidKeyException

      Throws:
        `java.security.NoSuchAlgorithmException`
        `java.security.SignatureException`
        `java.security.NoSuchProviderException`
        `java.security.InvalidKeyException`

    - #### verify

          public boolean verify(java.lang.String provider)
                         throws java.security.NoSuchAlgorithmException,
                                java.security.SignatureException,
                                java.security.NoSuchProviderException,
                                java.security.InvalidKeyException

      Throws:
        `java.security.NoSuchAlgorithmException`
        `java.security.SignatureException`
        `java.security.NoSuchProviderException`
        `java.security.InvalidKeyException`

    - #### getPublicKey

          public java.security.PublicKey getPublicKey(java.lang.String provider)
                                               throws java.security.NoSuchAlgorithmException,
                                                      java.security.NoSuchProviderException,
                                                      java.security.InvalidKeyException

      Throws:
        `java.security.NoSuchAlgorithmException`
        `java.security.NoSuchProviderException`
        `java.security.InvalidKeyException`