/** * initialise a Blowfish cipher. * * @param encrypting whether or not we are for encryption. * @param params the parameters required to set up the cipher. * @exception IllegalArgumentException if the params argument is * inappropriate. */ public void init( boolean encrypting, CipherParameters params) { if (params instanceof KeyParameter) { this.encrypting = encrypting; this.workingKey = ((KeyParameter)params).getKey(); setKey(this.workingKey); return; } throw new IllegalArgumentException("invalid parameter passed to Blowfish init - " + params.getClass().getName()); }
/** * initialise a Blowfish cipher. * * @param encrypting whether or not we are for encryption. * @param params the parameters required to set up the cipher. * @exception IllegalArgumentException if the params argument is * inappropriate. */ public void init( boolean encrypting, CipherParameters params) { if (params instanceof KeyParameter) { this.encrypting = encrypting; this.workingKey = ((KeyParameter)params).getKey(); setKey(this.workingKey); return; } throw new IllegalArgumentException("invalid parameter passed to Blowfish init - " + params.getClass().getName()); }