public class PKCS8KeyFile extends Object implements FileKeyProvider
| Modifier and Type | Class and Description |
|---|---|
static class |
PKCS8KeyFile.Factory |
| Modifier and Type | Field and Description |
|---|---|
protected KeyPair |
kp |
protected org.slf4j.Logger |
log |
protected char[] |
passphrase |
protected PasswordFinder |
pwdf |
protected Resource<?> |
resource |
protected KeyType |
type |
| Constructor and Description |
|---|
PKCS8KeyFile() |
| Modifier and Type | Method and Description |
|---|---|
PrivateKey |
getPrivate() |
PublicKey |
getPublic() |
KeyType |
getType() |
void |
init(File location) |
void |
init(File location,
PasswordFinder pwdf) |
void |
init(Reader location) |
void |
init(Reader location,
PasswordFinder pwdf) |
void |
init(String privateKey,
String publicKey) |
void |
init(String privateKey,
String publicKey,
PasswordFinder pwdf) |
protected KeyPair |
readKeyPair() |
String |
toString() |
protected final org.slf4j.Logger log
protected PasswordFinder pwdf
protected Resource<?> resource
protected KeyPair kp
protected KeyType type
protected char[] passphrase
public PrivateKey getPrivate() throws IOException
getPrivate in interface KeyProviderIOException - if there is an I/O error retrieving the private keypublic PublicKey getPublic() throws IOException
getPublic in interface KeyProviderIOException - if there is an I/O error retrieving the public keypublic KeyType getType() throws IOException
getType in interface KeyProviderKeyType.IOException - if there is an I/O error retrieving the key typepublic void init(Reader location)
init in interface FileKeyProviderpublic void init(Reader location, PasswordFinder pwdf)
init in interface FileKeyProviderpublic void init(File location)
init in interface FileKeyProviderpublic void init(File location, PasswordFinder pwdf)
init in interface FileKeyProviderpublic void init(String privateKey, String publicKey)
init in interface FileKeyProviderpublic void init(String privateKey, String publicKey, PasswordFinder pwdf)
init in interface FileKeyProviderprotected KeyPair readKeyPair() throws IOException
IOExceptionCopyright © 2009–2014. All rights reserved.