| Modifier and Type | Class and Description |
|---|---|
| private static class | Pem.
Clearable ByteArrayOutputStream for temporary data. |
| Modifier and Type | Field and Description |
|---|---|
| private static volatile Base64. | |
| private static final byte[] | |
| private static final byte[] | |
| public static final String | |
| public static final String | |
| private static final byte[] | |
| private static final byte[] | |
| public static final String | |
| public static final String | |
| private static final byte[] | |
| private static final Pattern | |
| private static final Pattern | |
| private static volatile ObjectIdentifier | |
| public static final String | |
| public static final String | |
| public static final String | |
| private static final Pattern | |
| public static final String | |
| public static final String | |
| public static final String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static byte[] | |
| public static byte[] | decryptEncoding(EncryptedPrivateKeyInfo ekpi, PBEKeySpec keySpec)
Decrypt the EncryptedPrivateKeyInfo with the given keySpec and return the PKCS#8 byte array |
| public static ObjectIdentifier | |
| private static boolean | |
| public static byte[] | pemEncoded(String type, byte[] base64)
Return a PEM encoding with the given type and base64 byte array. |
| public static byte[] | |
| public static PEM | Returns: a PEM instancean InputStream is, boolean if true, the hyphen length is 4 because the first
hyphen is assumed to have been read. This is needed
for the CertificateFactory X509 implementation. shortHeader)Read the PEM text and return it in it's three components: header, base64, and footer. |
| public static PEM | |
| public static BinaryEncodable | toPKCS8Encodable(byte[]
PKCS8 encoding encoded, Provider KeyFactory provider provider)With a given PKCS8 encoding, construct a PrivateKey or KeyPair. |
| private static String |
| b64Encoder | back to summary |
|---|---|
| private static volatile Base64. | |
| BEGIN_B | back to summary |
|---|---|
| private static final byte[] BEGIN_B | |
| BEGIN_PREFIX | back to summary |
|---|---|
| private static final byte[] BEGIN_PREFIX | |
| CERTIFICATE | back to summary |
|---|---|
| public static final String CERTIFICATE | |
| CRL | back to summary |
|---|---|
| public static final String CRL | |
| CRLF | back to summary |
|---|---|
| private static final byte[] CRLF | |
| DASH | back to summary |
|---|---|
| private static final byte[] DASH | |
| DEFAULT_ALGO | back to summary |
|---|---|
| public static final String DEFAULT_ALGO | |
| ENCRYPTED_PRIVATE_KEY | back to summary |
|---|---|
| public static final String ENCRYPTED_PRIVATE_KEY | |
| END_PREFIX | back to summary |
|---|---|
| private static final byte[] END_PREFIX | |
| LINE_WRAP_64_PATTERN | back to summary |
|---|---|
| private static final Pattern LINE_WRAP_64_PATTERN | |
| PBE_PATTERN | back to summary |
|---|---|
| private static final Pattern PBE_PATTERN | |
| PBES2OID | back to summary |
|---|---|
| private static volatile ObjectIdentifier PBES2OID | |
| PRIVATE_KEY | back to summary |
|---|---|
| public static final String PRIVATE_KEY | |
| PUBLIC_KEY | back to summary |
|---|---|
| public static final String PUBLIC_KEY | |
| RSA_PRIVATE_KEY | back to summary |
|---|---|
| public static final String RSA_PRIVATE_KEY | |
| STRIP_WHITESPACE_PATTERN | back to summary |
|---|---|
| private static final Pattern STRIP_WHITESPACE_PATTERN | |
| X509_CERTIFICATE | back to summary |
|---|---|
| public static final String X509_CERTIFICATE | |
| X509_CRL | back to summary |
|---|---|
| public static final String X509_CRL | |
| X_509_CERTIFICATE | back to summary |
|---|---|
| public static final String X_509_CERTIFICATE | |
| Pem | back to summary |
|---|---|
| public Pem() | |
| decode | back to summary |
|---|---|
| public static byte[] decode(String input) Decodes a PEM-encoded block.
| |
| decryptEncoding | back to summary |
|---|---|
| public static byte[] decryptEncoding(EncryptedPrivateKeyInfo ekpi, PBEKeySpec keySpec) throws NoSuchAlgorithmException, InvalidKeyException Decrypt the EncryptedPrivateKeyInfo with the given keySpec and return the PKCS#8 byte array | |
| getPBEID | back to summary |
|---|---|
| public static ObjectIdentifier getPBEID(String algorithm) Return the OID for a given PBE algorithm. PBES1 has an OID for each algorithm, while PBES2 has one OID for everything that complies with the formatting. Therefore, if the algorithm is not PBES1, it will return PBES2. Cipher will determine if this is a valid PBE algorithm. PBES2 specifies AES as the cipher algorithm, but any block cipher could be supported. | |
| matchesAt | back to summary |
|---|---|
| private static boolean matchesAt(byte[] source, int offset, byte[] match) | |
| pemEncoded | back to summary |
|---|---|
| public static byte[] pemEncoded(String type, byte[] base64) Return a PEM encoding with the given type and base64 byte array. | |
| pemEncodedFromDER | back to summary |
|---|---|
| public static byte[] pemEncodedFromDER(String type, byte[] der) | |
| readPEM | back to summary |
|---|---|
| public static PEM readPEM(InputStream is, boolean shortHeader) throws IOException Read the PEM text and return it in it's three components: header, base64, and footer. The header begins processing when "-----B" is read. At that point exceptions will be thrown for syntax errors. The method will leave the stream after reading the end of line of the footer or end of file
| |
| readPEM | back to summary |
|---|---|
| public static PEM readPEM(InputStream is) throws IOException | |
| toPKCS8Encodable | back to summary |
|---|---|
| public static BinaryEncodable toPKCS8Encodable(byte[] encoded, Provider provider) throws InvalidKeyException With a given PKCS8 encoding, construct a PrivateKey or KeyPair. A KeyPair is returned if requested and the encoding has a public key; otherwise, a PrivateKey is returned.
| |
| typeConverter | back to summary |
|---|---|
| private static String typeConverter(String type) | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| pack-priv byte[] | |
| pack-priv int |
| ClearableBufferStream | back to summary |
|---|---|
| pack-priv ClearableBufferStream(int len) | |
| clear | back to summary |
|---|---|
| pack-priv void clear() | |
| getBuffer | back to summary |
|---|---|
| pack-priv byte[] getBuffer() | |
| length | back to summary |
|---|---|
| pack-priv int length() | |