public class PKCS8KeyFile extends java.lang.Object implements FileKeyProvider
Modifier and Type | Class and Description |
---|---|
static class |
PKCS8KeyFile.Factory |
Modifier and Type | Field and Description |
---|---|
protected java.security.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 |
---|---|
java.security.PrivateKey |
getPrivate() |
java.security.PublicKey |
getPublic() |
KeyType |
getType() |
void |
init(java.io.File location) |
void |
init(java.io.File location,
PasswordFinder pwdf) |
void |
init(java.io.Reader location) |
void |
init(java.io.Reader location,
PasswordFinder pwdf) |
void |
init(java.lang.String privateKey,
java.lang.String publicKey) |
void |
init(java.lang.String privateKey,
java.lang.String publicKey,
PasswordFinder pwdf) |
protected java.security.KeyPair |
readKeyPair() |
java.lang.String |
toString() |
protected final org.slf4j.Logger log
protected PasswordFinder pwdf
protected Resource<?> resource
protected java.security.KeyPair kp
protected KeyType type
protected char[] passphrase
public java.security.PrivateKey getPrivate() throws java.io.IOException
getPrivate
in interface KeyProvider
java.io.IOException
- if there is an I/O error retrieving the private keypublic java.security.PublicKey getPublic() throws java.io.IOException
getPublic
in interface KeyProvider
java.io.IOException
- if there is an I/O error retrieving the public keypublic KeyType getType() throws java.io.IOException
getType
in interface KeyProvider
KeyType
.java.io.IOException
- if there is an I/O error retrieving the key typepublic void init(java.io.Reader location)
init
in interface FileKeyProvider
public void init(java.io.Reader location, PasswordFinder pwdf)
init
in interface FileKeyProvider
public void init(java.io.File location)
init
in interface FileKeyProvider
public void init(java.io.File location, PasswordFinder pwdf)
init
in interface FileKeyProvider
public void init(java.lang.String privateKey, java.lang.String publicKey)
init
in interface FileKeyProvider
public void init(java.lang.String privateKey, java.lang.String publicKey, PasswordFinder pwdf)
init
in interface FileKeyProvider
protected java.security.KeyPair readKeyPair() throws java.io.IOException
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object