Overview | Package | Class | Tree | Deprecated | Index | Help
| Bouncy Castle Cryptography Library 1.85
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.bouncycastle.pqc.crypto.util
Class PublicKeyFactory

    java.lang.Object
      org.bouncycastle.pqc.crypto.util.PublicKeyFactory

public class PublicKeyFactory
extends java.lang.Object

Factory to create asymmetric public key parameters for asymmetric ciphers from range of ASN.1 encoded SubjectPublicKeyInfo objects.

Constructor Summary
`PublicKeyFactory()`

Method Summary
`static AsymmetricKeyParameter` | `createKey(byte[] keyInfoData)` Create a public key from a SubjectPublicKeyInfo encoding
`static AsymmetricKeyParameter` | `createKey(java.io.InputStream inStr)` Create a public key from a SubjectPublicKeyInfo encoding read from a stream
`static AsymmetricKeyParameter` | `createKey(SubjectPublicKeyInfo keyInfo)` Create a public key from the passed in SubjectPublicKeyInfo
`static AsymmetricKeyParameter` | `createKey(SubjectPublicKeyInfo keyInfo, java.lang.Object defaultParams)` Create a public key from the passed in SubjectPublicKeyInfo

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PublicKeyFactory

    public PublicKeyFactory()

Method Detail

### createKey

    public static AsymmetricKeyParameter createKey(byte[] keyInfoData)
                                            throws java.io.IOException

  Create a public key from a SubjectPublicKeyInfo encoding

  Parameters:
    `keyInfoData` - the SubjectPublicKeyInfo encoding
  Returns:
    the appropriate key parameter
  Throws:
    `java.io.IOException` - on an error decoding the key

### createKey

    public static AsymmetricKeyParameter createKey(java.io.InputStream inStr)
                                            throws java.io.IOException

  Create a public key from a SubjectPublicKeyInfo encoding read from a stream

  Parameters:
    `inStr` - the stream to read the SubjectPublicKeyInfo encoding from
  Returns:
    the appropriate key parameter
  Throws:
    `java.io.IOException` - on an error decoding the key

### createKey

    public static AsymmetricKeyParameter createKey(SubjectPublicKeyInfo keyInfo)
                                            throws java.io.IOException

  Create a public key from the passed in SubjectPublicKeyInfo

  Parameters:
    `keyInfo` - the SubjectPublicKeyInfo containing the key data
  Returns:
    the appropriate key parameter
  Throws:
    `java.io.IOException` - on an error decoding the key

### createKey

    public static AsymmetricKeyParameter createKey(SubjectPublicKeyInfo keyInfo,
                                                   java.lang.Object defaultParams)
                                            throws java.io.IOException

  Create a public key from the passed in SubjectPublicKeyInfo

  Parameters:
    `keyInfo` - the SubjectPublicKeyInfo containing the key data
    `defaultParams` - default parameters that might be needed.
  Returns:
    the appropriate key parameter
  Throws:
    `java.io.IOException` - on an error decoding the key

Overview | Package | Class | Tree | Deprecated | Index | Help
| Bouncy Castle Cryptography Library 1.85
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD