org.bouncycastle.crypto.util
Class PublicKeyFactory
java.lang.Object
org.bouncycastle.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.
createKey
public static AsymmetricKeyParameter createKey(InputStream inStr)
throws IOException
Create a public key from a SubjectPublicKeyInfo encoding read from a stream
inStr
- the stream to read the SubjectPublicKeyInfo encoding from
- the appropriate key parameter
createKey
public static AsymmetricKeyParameter createKey(byte[] keyInfoData)
throws IOException
Create a public key from a SubjectPublicKeyInfo encoding
keyInfoData
- the SubjectPublicKeyInfo encoding
- the appropriate key parameter
createKey
public static AsymmetricKeyParameter createKey(SubjectPublicKeyInfo keyInfo)
throws IOException
Create a public key from the passed in SubjectPublicKeyInfo
keyInfo
- the SubjectPublicKeyInfo containing the key data
- the appropriate key parameter