public final class PemUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DEK_INFO
Decryption infor tag for PEM-encoded private key in OpenSSL format.
|
static String |
FOOTER_END
PEM encoding footer start string.
|
static String |
HEADER_BEGIN
PEM encoding header start string.
|
static int |
LINE_LENGTH
Line length.
|
static String |
PROC_TYPE
Procedure type tag for PEM-encoded private key in OpenSSL format.
|
Modifier and Type | Method and Description |
---|---|
static byte[] |
decode(byte[] pem)
Decodes a PEM-encoded cryptographic object into the raw bytes of its ASN.1 encoding.
|
static byte[] |
decode(String pem)
Decodes one or more PEM-encoded cryptographic objects into the raw bytes of their ASN.1 encoding.
|
static boolean |
isBase64Char(byte b)
Determines whether the given byte represents an ASCII character in the character set for base64 encoding.
|
static boolean |
isPem(byte[] data)
Determines whether the data in the given byte array is base64-encoded data of PEM encoding.
|
public static final int LINE_LENGTH
public static final String HEADER_BEGIN
public static final String FOOTER_END
public static final String PROC_TYPE
public static final String DEK_INFO
public static boolean isPem(byte[] data)
data
- Data to test for PEM encodingpublic static boolean isBase64Char(byte b)
b
- Byte to test.public static byte[] decode(byte[] pem)
pem
- Bytes of PEM-encoded data to decode.public static byte[] decode(String pem)
pem
- PEM-encoded data to decode.Copyright © 2003-2024 Virginia Tech. All Rights Reserved.