public class X509PublicKeySpec
extends java.security.spec.X509EncodedKeySpec
implements java.security.spec.AlgorithmParameterSpec
Constructor and Description |
---|
X509PublicKeySpec(byte[] encodedKey)
Creates a new X509PublicKeySpec with the given encoded key.
|
Modifier and Type | Method and Description |
---|---|
static X509PublicKeySpec |
fromKey(java.security.PublicKey publicKey)
Creates a new X509PublicKeySpec with the given public key.
|
public X509PublicKeySpec(byte[] encodedKey)
encodedKey
- the key, which is assumed to be
encoded according to the X.509 standard. The contents of the
array are copied to protect against subsequent modification.java.lang.NullPointerException
- if encodedKey
is null.public static X509PublicKeySpec fromKey(java.security.PublicKey publicKey)
publicKey
- the key, which is assumed to be
encoded according to the X.509 standard. The contents of the
array are copied to protect against subsequent modification.java.lang.NullPointerException
- if encodedKey
is null.