public class PEMUtil extends Object
Constructor and Description |
---|
PEMUtil() |
Modifier and Type | Method and Description |
---|---|
static Key |
readKey(byte[] keyBytes,
char[] passphrase)
Read a single PEM-formatted key
|
static Key |
readKey(File privateKeyFile,
char[] passphrase)
Read a single PEM-formatted key
|
static Key |
readKey(InputStream is,
char[] passphrase)
Read a single PEM-formatted key
|
public static Key readKey(InputStream is, char[] passphrase) throws IOException
is
- input streampassphrase
- passphrase protecting streamIOException
- if not successful because I/Opublic static Key readKey(File privateKeyFile, char[] passphrase) throws IOException
privateKeyFile
- private key filepassphrase
- passphrase for protected fileIOException
- if not successfulpublic static Key readKey(byte[] keyBytes, char[] passphrase) throws IOException
keyBytes
- data for keypassphrase
- passphraseIOException
- if not successfulCopyright © 2013-2017. All Rights Reserved.