Home | History | Annotate | Download | only in encodings

Lines Matching refs:block

215         byte[] block = new byte[engine.getInputBlockSize()];
219 block[0] = 0x01; // type code 1
221 for (int i = 1; i != block.length - inLen - 1; i++)
223 block[i] = (byte)0xFF;
228 random.nextBytes(block); // random fill
230 block[0] = 0x02; // type code 2
236 for (int i = 1; i != block.length - inLen - 1; i++)
238 while (block[i] == 0)
240 block[i] = (byte)random.nextInt();
245 block[block.length - inLen - 1] = 0x00; // mark the end of the padding
246 System.arraycopy(in, inOff, block, block.length - inLen, inLen);
248 return engine.processBlock(block, 0, block.length);
302 * @param in The encrypted block.
303 * @param inOff Offset in the encrypted block.
304 * @param inLen Length of the encrypted block.
317 byte[] block = engine.processBlock(in, inOff, inLen);
329 byte[] data = (useStrictLength & (block.length != engine.getOutputBlockSize())) ? blockBuffer : block;
352 * @throws InvalidCipherTextException if the decrypted block is not in PKCS1 format.
369 byte[] block = engine.processBlock(in, inOff, inLen);
370 boolean incorrectLength = (useStrictLength & (block.length != engine.getOutputBlockSize()));
373 if (block.length < getOutputBlockSize())
379 data = block;
395 // find and extract the message block.
404 throw new InvalidCipherTextException("block incorrect");
411 throw new InvalidCipherTextException("block incorrect size");
421 private int findStart(byte type, byte[] block)
427 for (int i = 1; i != block.length; i++)
429 byte pad = block[i];