public class PEMFormatUtil extends Object
Created by Jeff Gaynor
on Jun 7, 2011 at 11:37:35 AM
Constructor and Description |
---|
PEMFormatUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
bytesToChunkedString(byte[] body)
Fixes OAUTH-212: upgrade to version 1.10 of apache commons no longer chunks strings, so PEM format of
all keys and certs are no longer readable by Open SSL, e.g.
|
static String |
delimitBody(byte[] body,
String head,
String tail) |
static void |
delimitBody(byte[] body,
String head,
String tail,
OutputStream outputStream) |
static String |
delimitBody(String body,
String head,
String tail)
Utility to delimit a string (usually base 4 encoded DER byte array) with specific
head and tail.
|
static void |
delimitBody(String body,
String head,
String tail,
OutputStream outputStream) |
protected static void |
delimitBody(String body,
String head,
String tail,
PrintWriter pw) |
static void |
delimitBody(String body,
String head,
String tail,
Writer writer) |
static String |
getBody(String pem,
String head,
String tail)
Strip off the head and tail of a PEM encoded string.
|
static byte[] |
getBodyBytes(String pem,
String head,
String tail) |
static String |
readerToString(Reader f)
Take a reader and stick its convents into a string.
|
public static String getBody(String pem, String head, String tail)
pem
- head
- tail
- public static String delimitBody(String body, String head, String tail)
body
- head
- tail
- public static void delimitBody(byte[] body, String head, String tail, OutputStream outputStream)
public static String bytesToChunkedString(byte[] body)
body
- protected static void delimitBody(String body, String head, String tail, PrintWriter pw)
public static void delimitBody(String body, String head, String tail, OutputStream outputStream)
public static String readerToString(Reader f) throws IOException
f
- IOException
Copyright © 2019. All Rights Reserved.