public class PKCS1EncodedKeySpec
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private java.security.spec.RSAPrivateCrtKeySpec |
keySpec |
| Constructor and Description |
|---|
PKCS1EncodedKeySpec(byte[] keyBytes)
Create a PKCS#1 keyspec from DER encoded buffer
|
| Modifier and Type | Method and Description |
|---|---|
private void |
decode(byte[] keyBytes)
Decode PKCS#1 encoded private key into RSAPrivateCrtKeySpec.
|
java.security.spec.RSAPrivateCrtKeySpec |
getKeySpec()
Get the key spec that JCE understands.
|
public PKCS1EncodedKeySpec(byte[] keyBytes)
throws java.io.IOException
keyBytes - DER encoded octet streamjava.io.IOExceptionpublic java.security.spec.RSAPrivateCrtKeySpec getKeySpec()
private void decode(byte[] keyBytes)
throws java.io.IOException
--
-- Representation of RSA private key with information for the CRT algorithm.
--
RSAPrivateKey ::= SEQUENCE {
version Version,
modulus INTEGER, -- n
publicExponent INTEGER, -- e
privateExponent INTEGER, -- d
prime1 INTEGER, -- p
prime2 INTEGER, -- q
exponent1 INTEGER, -- d mod (p-1)
exponent2 INTEGER, -- d mod (q-1)
coefficient INTEGER, -- (inverse of q) mod p
otherPrimeInfos OtherPrimeInfos OPTIONAL
}
keyBytes - PKCS#1 encoded keyjava.io.IOException