/** * initialise a RC5-64 cipher. * * @param forEncryption 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 forEncryption, CipherParameters params) { if (!(params instanceof RC5Parameters)) { throw new IllegalArgumentException("invalid parameter passed to RC564 init - " + params.getClass().getName()); } RC5Parameters p = (RC5Parameters)params; this.forEncryption = forEncryption; _noRounds = p.getRounds(); setKey(p.getKey()); }