er.extensions.crypting
Class ERXKeyStoreBlowfishCrypter
java.lang.Object
er.extensions.crypting.ERXAbstractBlowfishCrypter
er.extensions.crypting.ERXKeyStoreBlowfishCrypter
- All Implemented Interfaces:
- ERXCrypterInterface
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
- Author:
- mschrag
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) |
Method Summary |
static void |
main(java.lang.String[] args)
|
protected java.security.Key |
secretBlowfishKey()
Returns the secret key to use for this cipher. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ERXKeyStoreBlowfishCrypter
public ERXKeyStoreBlowfishCrypter()
secretBlowfishKey
protected java.security.Key secretBlowfishKey()
throws java.security.NoSuchAlgorithmException,
java.security.KeyStoreException,
java.security.UnrecoverableKeyException,
java.security.cert.CertificateException,
java.io.IOException
- Description copied from class:
ERXAbstractBlowfishCrypter
- Returns the secret key to use for this cipher.
- Specified by:
secretBlowfishKey
in class ERXAbstractBlowfishCrypter
- Returns:
- a secret key for the blowfish cipher
- Throws:
java.security.NoSuchAlgorithmException
java.security.KeyStoreException
java.security.UnrecoverableKeyException
java.security.cert.CertificateException
java.io.IOException
main
public 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
- Throws:
java.security.KeyStoreException
java.security.NoSuchAlgorithmException
java.security.UnrecoverableKeyException
java.security.cert.CertificateException
java.io.FileNotFoundException
java.io.IOException
Copyright © 2002 – 2007 Project Wonder.