public class PKCS5KeyFile extends java.lang.Object implements FileKeyProvider
| Modifier and Type | Class and Description |
|---|---|
static class |
PKCS5KeyFile.DecryptException
Indicates a problem decrypting the data
|
static class |
PKCS5KeyFile.Factory |
static class |
PKCS5KeyFile.FormatException
Indicates a format issue with PKCS5 data
|
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
data |
protected java.security.KeyPair |
kp |
protected PasswordFinder |
pwdf |
protected Resource<?> |
resource |
protected KeyType |
type |
| Constructor and Description |
|---|
PKCS5KeyFile() |
| 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 PasswordFinder pwdf
protected Resource<?> resource
protected java.security.KeyPair kp
protected KeyType type
protected byte[] data
public java.security.PrivateKey getPrivate()
throws java.io.IOException
getPrivate in interface KeyProviderjava.io.IOException - if there is an I/O error retrieving the private keypublic java.security.PublicKey getPublic()
throws java.io.IOException
getPublic in interface KeyProviderjava.io.IOException - if there is an I/O error retrieving the public keypublic KeyType getType() throws java.io.IOException
getType in interface KeyProviderKeyType.java.io.IOException - if there is an I/O error retrieving the key typepublic void init(java.io.Reader location)
init in interface FileKeyProviderpublic void init(java.io.Reader location,
PasswordFinder pwdf)
init in interface FileKeyProviderpublic void init(java.io.File location)
init in interface FileKeyProviderpublic void init(java.io.File location,
PasswordFinder pwdf)
init in interface FileKeyProviderpublic void init(java.lang.String privateKey,
java.lang.String publicKey)
init in interface FileKeyProviderpublic void init(java.lang.String privateKey,
java.lang.String publicKey,
PasswordFinder pwdf)
init in interface FileKeyProviderprotected java.security.KeyPair readKeyPair()
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Object