We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It seems that the ZeroBytePadding detects the end with 0.
ZeroBytePadding
0
@MethodSource({"getArgumentsStream"}) @ParameterizedTest void __one(final BufferedBlockCipher cipher, final CipherParameters params) throws Exception { // ------------------------------------------------------------------------------------------------------- plain // final var plain = _RandomTestUtils.newRandomBytes(1); final var plain = new byte[]{0}; // ----------------------------------------------------------------------------------------------------- encrypt cipher.init(true, params); final var encrypted = JinahyaBufferedBlockCipherUtils.processBytesAndDoFinal(cipher, plain); // ----------------------------------------------------------------------------------------------------- decrypt cipher.init(false, params); final var decrypted = JinahyaBufferedBlockCipherUtils.processBytesAndDoFinal(cipher, encrypted); // ------------------------------------------------------------------------------------------------------------- _LogUtils.log(plain, encrypted, decrypted); assertThat(decrypted).isEqualTo(plain); }
plain: 1, AA== encrypted: 16, PQFUtQ/fA78CrDl95CTWdQ== decrypted: 0,
Is the padding is a general-purpose one?
The text was updated successfully, but these errors were encountered:
Nope, only added under duress, for backwards compatibility. Don't use it in anything new. Ever.
Sorry, something went wrong.
No branches or pull requests
It seems that the
ZeroBytePadding
detects the end with0
.Is the padding is a general-purpose one?
The text was updated successfully, but these errors were encountered: