public class ERXKeyStoreBlowfishCrypter extends ERXAbstractBlowfishCrypter
ERXKeyStoreBlowfishCrypter is a blowfish implementation of the crypter interface that loads its secret key from a java keystore.
Because the java keystore API is so damn ridiculous, you can use the main method provided in this class to generate the keystore with your blowfish password in it.
If you want to just use all of the default values, you can run this class's main method from inside eclipse with the arguments:
"" "" "" "" "yourblowfishpassword"
The easiest way to choose to use this crypter is to override the default blowfish crypter with the Properties entries:
er.extensions.ERXCrypto.crypters=Blowfish
er.extensions.ERXCrypto.crypter.Blowfish=er.extensions.ERXKeyStoreBlowfishCrypter
| Properties | |
er.extensions.ERXKeyStoreBlowfishCrypter.keystorePath | the path of
the keystore that contains the blowfish key for this crypter. The
default keystore path is
"~/.er.extensions.ERXKeyStoreBlowfishCrypter.keystore" |
er.extensions.ERXKeyStoreBlowfishCrypter.keystorePassword | the
keystore password (if necessary) |
er.extensions.ERXKeyStoreBlowfishCrypter.keyAlias | the alias of the
blowfish key in the keystore |
er.extensions.ERXKeyStoreBlowfishCrypter.keyPassword | the password
of the blowfish key in the keystore (if necessary) |
log| Constructor and Description |
|---|
ERXKeyStoreBlowfishCrypter() |
| Modifier and Type | Method and Description |
|---|---|
static void |
main(java.lang.String[] args) |
protected java.security.Key |
secretBlowfishKey()
Returns the secret key to use for this cipher.
|
blockSize, createBlowfishCipher, decrypt, decryptCipher, encrypt, encryptCipher, setBlockSizeprotected java.security.Key secretBlowfishKey()
throws java.security.NoSuchAlgorithmException,
java.security.KeyStoreException,
java.security.UnrecoverableKeyException,
java.security.cert.CertificateException,
java.io.IOException
ERXAbstractBlowfishCryptersecretBlowfishKey in class ERXAbstractBlowfishCrypterjava.security.NoSuchAlgorithmExceptionjava.security.KeyStoreExceptionjava.security.UnrecoverableKeyExceptionjava.security.cert.CertificateExceptionjava.io.IOExceptionpublic static void main(java.lang.String[] args)
throws java.security.KeyStoreException,
java.security.NoSuchAlgorithmException,
java.security.UnrecoverableKeyException,
java.security.cert.CertificateException,
java.io.FileNotFoundException,
java.io.IOException
java.security.KeyStoreExceptionjava.security.NoSuchAlgorithmExceptionjava.security.UnrecoverableKeyExceptionjava.security.cert.CertificateExceptionjava.io.FileNotFoundExceptionjava.io.IOExceptionCopyright © 2002 – 2022 Project Wonder.