From 069663afa1a8e0a1e86be325e790aaa11572f1be Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Thu, 8 Jul 2021 22:30:04 +0700 Subject: Test for long inputs --- crypto/test/src/cms/test/AuthenticatedDataStreamTest.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/crypto/test/src/cms/test/AuthenticatedDataStreamTest.cs b/crypto/test/src/cms/test/AuthenticatedDataStreamTest.cs index 89a2174b7..68f38d190 100644 --- a/crypto/test/src/cms/test/AuthenticatedDataStreamTest.cs +++ b/crypto/test/src/cms/test/AuthenticatedDataStreamTest.cs @@ -72,14 +72,13 @@ namespace Org.BouncyCastle.Cms.Tests [Test] public void TestKeyTransDESede() { - tryKeyTrans(CmsAuthenticatedDataGenerator.DesEde3Cbc); - } + tryKeyTrans(Encoding.ASCII.GetBytes("Eric H. Echidna"), CmsEnvelopedGenerator.DesEde3Cbc); + // force multiple octet-string + tryKeyTrans(new byte[2500], CmsEnvelopedGenerator.DesEde3Cbc); + } - private void tryKeyTrans( - string macAlg) + private void tryKeyTrans(byte[] data, string macAlg) { - byte[] data = Encoding.ASCII.GetBytes("Eric H. Echidna"); - CmsAuthenticatedDataStreamGenerator adGen = new CmsAuthenticatedDataStreamGenerator(); adGen.AddKeyTransRecipient(ReciCert); -- cgit 1.4.1