public class PKCS8KeyFile extends Object implements FileKeyProvider
Modifier and Type | Class and Description |
---|---|
static class |
PKCS8KeyFile.Factory |
FileKeyProvider.Format
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(String privateKey,
String publicKey) |
void |
init(String privateKey,
String publicKey,
PasswordFinder pwdf) |
protected org.bouncycastle.openssl.PasswordFinder |
makeBouncyPasswordFinder() |
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 KeyProvider
IOException
- if there is an I/O error retrieving the private keypublic PublicKey getPublic() throws IOException
getPublic
in interface KeyProvider
IOException
- if there is an I/O error retrieving the public keypublic KeyType getType() throws IOException
getType
in interface KeyProvider
KeyType
.IOException
- if there is an I/O error retrieving the key typepublic void init(File location)
init
in interface FileKeyProvider
public void init(File location, PasswordFinder pwdf)
init
in interface FileKeyProvider
public void init(String privateKey, String publicKey)
init
in interface FileKeyProvider
public void init(String privateKey, String publicKey, PasswordFinder pwdf)
init
in interface FileKeyProvider
protected org.bouncycastle.openssl.PasswordFinder makeBouncyPasswordFinder()
protected KeyPair readKeyPair() throws IOException
IOException
Copyright © 2009-2013. All Rights Reserved.