public class JcrKeyring extends AbstractKeyring implements ArgeoNames
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_CIPHER_NAME |
static java.lang.String |
DEFAULT_SECRETE_KEY_ENCRYPTION |
static java.lang.String |
DEFAULT_SECRETE_KEY_FACTORY |
static java.lang.Long |
DEFAULT_SECRETE_KEY_LENGTH
Stronger with 256, but causes problem with Oracle JVM, force 128 in this case
|
ARGEO_CIPHER, ARGEO_IS_KEY, ARGEO_ITERATION_COUNT, ARGEO_IV, ARGEO_KEY_LENGTH, ARGEO_KEYRING, ARGEO_NAMESPACE, ARGEO_PASSWORD, ARGEO_REMOTE, ARGEO_SALT, ARGEO_SECRET_KEY_ENCRYPTION, ARGEO_SECRET_KEY_FACTORY, ARGEO_URI, ARGEO_USER_ID| Constructor and Description |
|---|
JcrKeyring(Repository repository)
When setup is called the session has not yet been saved and we don't want to
save it since there maybe other data which would be inconsistent.
|
| Modifier and Type | Method and Description |
|---|---|
void |
changePassword(char[] oldPassword,
char[] newPassword) |
protected javax.crypto.Cipher |
createCipher() |
protected java.io.InputStream |
decrypt(javax.crypto.SecretKey secretKey,
javax.crypto.Cipher cipher,
Node node) |
protected java.io.InputStream |
decrypt(java.lang.String path) |
protected void |
encrypt(javax.crypto.SecretKey secretKey,
javax.crypto.Cipher cipher,
Node node,
java.io.InputStream unencrypted) |
protected void |
encrypt(java.lang.String path,
java.io.InputStream unencrypted)
The parent node must already exist at this path.
|
protected void |
handleKeySpecCallback(PBEKeySpecCallback pbeCallback)
Populates the key spec callback
|
protected java.lang.Boolean |
isSetup()
Whether the keyring has already been created in the past with a master
password
|
void |
setCipherName(java.lang.String cipherName) |
void |
setIterationCountFactor(java.lang.Integer iterationCountFactor) |
void |
setSecretKeyEncryption(java.lang.String secreteKeyEncryption) |
void |
setSecretKeyFactoryName(java.lang.String secreteKeyFactoryName) |
void |
setSecretKeyLength(java.lang.Long keyLength) |
protected void |
setup(char[] password)
Setup the keyring persistently,
AbstractKeyring.isSetup() must return true
afterwards |
ask, getAsChars, getAsStream, getSecretKey, getSecurityProvider, set, set, setCharset, setDefaultCallbackHandler, setSecurityProviderName, unlockpublic static final java.lang.Long DEFAULT_SECRETE_KEY_LENGTH
public static final java.lang.String DEFAULT_SECRETE_KEY_FACTORY
public static final java.lang.String DEFAULT_SECRETE_KEY_ENCRYPTION
public static final java.lang.String DEFAULT_CIPHER_NAME
public JcrKeyring(Repository repository)
protected java.lang.Boolean isSetup()
AbstractKeyringisSetup in class AbstractKeyringprotected void setup(char[] password)
AbstractKeyringAbstractKeyring.isSetup() must return true
afterwardssetup in class AbstractKeyringprotected void handleKeySpecCallback(PBEKeySpecCallback pbeCallback)
AbstractKeyringhandleKeySpecCallback in class AbstractKeyringprotected void encrypt(java.lang.String path,
java.io.InputStream unencrypted)
encrypt in class AbstractKeyringprotected void encrypt(javax.crypto.SecretKey secretKey,
javax.crypto.Cipher cipher,
Node node,
java.io.InputStream unencrypted)
protected java.io.InputStream decrypt(java.lang.String path)
decrypt in class AbstractKeyringprotected java.io.InputStream decrypt(javax.crypto.SecretKey secretKey,
javax.crypto.Cipher cipher,
Node node)
throws RepositoryException,
java.security.GeneralSecurityException
RepositoryExceptionjava.security.GeneralSecurityExceptionprotected javax.crypto.Cipher createCipher()
public void changePassword(char[] oldPassword,
char[] newPassword)
changePassword in interface CryptoKeyringpublic void setIterationCountFactor(java.lang.Integer iterationCountFactor)
public void setSecretKeyLength(java.lang.Long keyLength)
public void setSecretKeyFactoryName(java.lang.String secreteKeyFactoryName)
public void setSecretKeyEncryption(java.lang.String secreteKeyEncryption)
public void setCipherName(java.lang.String cipherName)
Copyright © 2007–2020. All rights reserved.