This padding pads the block out with the compliment of the last bit of the plain text.
354355356357358359360361362363364
{ cipher = new BufferedGenericBlockCipher(cipher.getUnderlyingCipher(), new ISO7816d4Padding()); } else if (paddingName.equals("TBCPADDING")) { cipher = new BufferedGenericBlockCipher(cipher.getUnderlyingCipher(), new TBCPadding()); } else { throw new NoSuchPaddingException("Padding " + padding + " unknown."); }
328329330331332333334335336337338
{ cipher = new BufferedGenericBlockCipher(cipher.getUnderlyingCipher(), new ISO7816d4Padding()); } else if (paddingName.equals("TBCPADDING")) { cipher = new BufferedGenericBlockCipher(cipher.getUnderlyingCipher(), new TBCPadding()); } else if (paddingName.equals("WITHCTS")) { padded = false; cipher = new BufferedGenericBlockCipher(new CTSBlockCipher(cipher.getUnderlyingCipher()));
159160161162163164165166167168169
if (!res.isSuccessful()) { return res; } res = testPadding(new TBCPadding(), rand, Hex.decode("ffffff0000000000"), Hex.decode("00000000ffffffff")); if (!res.isSuccessful()) { return res;
344345346347348349350351352353354
294295296297298299300301302303304
{ cipher = new PaddedBufferedBlockCipher(cipher.getUnderlyingCipher(), new ISO7816d4Padding()); } else if (paddingName.equals("TBCPADDING")) { cipher = new PaddedBufferedBlockCipher(cipher.getUnderlyingCipher(), new TBCPadding()); } else if (paddingName.equals("WITHCTS")) { padded = false; cipher = new CTSBlockCipher(cipher.getUnderlyingCipher());
312313314315316317318319320321322