/** * generate a signature for the loaded message using the key we were * initialised with. */ public byte[] generateSignature() throws CryptoException { createSignatureBlock(); BigInteger t = new BigInteger(1, cipher.processBlock(block, 0, block.length)); clearBlock(block); t = t.min(kParam.getModulus().subtract(t)); return BigIntegers.asUnsignedByteArray((kParam.getModulus().bitLength() + 7) / 8, t); }
clearBlock(block); clearBlock(fBlock);