Commit 5ed02ce 1 parent a20d0a5 commit 5ed02ce Copy full SHA for 5ed02ce
File tree 1 file changed +8
-2
lines changed
src/third-parties/cryptopp
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -618,8 +618,14 @@ void StreamTransformationFilter::InitializeDerivedAndReturnNewSizes(const NameVa
618
618
else
619
619
m_padding = padding;
620
620
621
- if (!isBlockCipher && (m_padding == PKCS_PADDING || m_padding == ONE_AND_ZEROS_PADDING))
622
- throw InvalidArgument (" StreamTransformationFilter: PKCS_PADDING and ONE_AND_ZEROS_PADDING cannot be used with " + m_cipher.AlgorithmName ());
621
+ if (!isBlockCipher && (m_padding == PKCS_PADDING))
622
+ throw InvalidArgument (" StreamTransformationFilter: PKCS_PADDING cannot be used with " + m_cipher.AlgorithmName ());
623
+
624
+ if (!isBlockCipher && (m_padding == W3C_PADDING))
625
+ throw InvalidArgument (" StreamTransformationFilter: W3C_PADDING cannot be used with " + m_cipher.AlgorithmName ());
626
+
627
+ if (!isBlockCipher && (m_padding == ONE_AND_ZEROS_PADDING))
628
+ throw InvalidArgument (" StreamTransformationFilter: ONE_AND_ZEROS_PADDING cannot be used with " + m_cipher.AlgorithmName ());
623
629
624
630
firstSize = 0 ;
625
631
blockSize = m_cipher.MandatoryBlockSize ();
You can’t perform that action at this time.
0 commit comments