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
Name | Description |
---|---|
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) |
Constructor and Description |
---|
ERXKeyStoreBlowfishCrypter() |
Modifier and Type | Method and Description |
---|---|
static void |
main(String[] args) |
protected Key |
secretBlowfishKey()
Returns the secret key to use for this cipher.
|
blockSize, createBlowfishCipher, decrypt, decryptCipher, encrypt, encryptCipher, setBlockSize
protected Key secretBlowfishKey() throws NoSuchAlgorithmException, KeyStoreException, UnrecoverableKeyException, CertificateException, IOException
ERXAbstractBlowfishCrypter
secretBlowfishKey
in class ERXAbstractBlowfishCrypter
NoSuchAlgorithmException
KeyStoreException
UnrecoverableKeyException
CertificateException
IOException
public static void main(String[] args) throws KeyStoreException, NoSuchAlgorithmException, UnrecoverableKeyException, CertificateException, FileNotFoundException, IOException
Copyright © 2002 – 2024 Project Wonder.