summary refs log tree commit diff
path: root/crypto/test
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2021-07-21 19:44:38 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2021-07-21 19:44:38 +0700
commit711fda7025306bacc23a24578a26f2530971e718 (patch)
tree0aae3596251154f856c73fa8effb951fb3180fb3 /crypto/test
parentAES perf. opt. (diff)
downloadBouncyCastle.NET-ed25519-711fda7025306bacc23a24578a26f2530971e718.tar.xz
Followup OAEP changes
Diffstat (limited to 'crypto/test')
-rw-r--r--crypto/test/src/cms/test/EnvelopedDataTest.cs62
1 files changed, 31 insertions, 31 deletions
diff --git a/crypto/test/src/cms/test/EnvelopedDataTest.cs b/crypto/test/src/cms/test/EnvelopedDataTest.cs
index 04e75f623..1017d35db 100644
--- a/crypto/test/src/cms/test/EnvelopedDataTest.cs
+++ b/crypto/test/src/cms/test/EnvelopedDataTest.cs
@@ -326,7 +326,7 @@ namespace Org.BouncyCastle.Cms.Tests
 		}
 
 		[Test]
-		public void TestKeyTransSmallAesUsingAoep()
+		public void TestKeyTransSmallAesUsingOaep()
 		{
 			byte[] data = new byte[] { 0, 1, 2, 3 };
 
@@ -356,7 +356,7 @@ namespace Org.BouncyCastle.Cms.Tests
 		}
 
 		[Test]
-		public void TestKeyTransSmallAesUsingAoepMixed()
+		public void TestKeyTransSmallAesUsingOaepMixed()
 		{
 			byte[] data = new byte[] { 0, 1, 2, 3 };
 
@@ -384,44 +384,44 @@ namespace Org.BouncyCastle.Cms.Tests
 			}
 		}
 
-		[Test]
-		public void TestKeyTransSmallAesUsingAoepMixedParams()
-		{
-			byte[] data = new byte[] { 0, 1, 2, 3 };
+        [Test]
+        public void TestKeyTransSmallAesUsingOaepMixedParams()
+        {
+            byte[] data = new byte[]{ 0, 1, 2, 3 };
 
-			CmsEnvelopedDataGenerator edGen = new CmsEnvelopedDataGenerator();
+            CmsEnvelopedDataGenerator edGen = new CmsEnvelopedDataGenerator();
 
-			edGen.AddRecipientInfoGenerator(
-				new KeyTransRecipientInfoGenerator(
-					ReciCert, 
-					new Asn1KeyWrapper(
-						PkcsObjectIdentifiers.IdRsaesOaep, 
-						new RsaesOaepParameters(
-							new AlgorithmIdentifier(NistObjectIdentifiers.IdSha256, DerNull.Instance),
-							new AlgorithmIdentifier(PkcsObjectIdentifiers.IdMgf1, new AlgorithmIdentifier(NistObjectIdentifiers.IdSha224, DerNull.Instance))),
-								ReciCert)));
+            edGen.AddRecipientInfoGenerator(
+                new KeyTransRecipientInfoGenerator(
+                    ReciCert,
+                    new Asn1KeyWrapper(
+                        PkcsObjectIdentifiers.IdRsaesOaep,
+                        new RsaesOaepParameters(
+                            new AlgorithmIdentifier(NistObjectIdentifiers.IdSha256, DerNull.Instance),
+                            new AlgorithmIdentifier(PkcsObjectIdentifiers.IdMgf1,
+                                new AlgorithmIdentifier(NistObjectIdentifiers.IdSha224, DerNull.Instance))),
+                        ReciCert)));
 
-			CmsEnvelopedData ed = edGen.Generate(
-				new CmsProcessableByteArray(data),
-				CmsEnvelopedDataGenerator.Aes128Cbc);
+            CmsEnvelopedData ed = edGen.Generate(
+                new CmsProcessableByteArray(data),
+                CmsEnvelopedGenerator.Aes128Cbc);
 
-			RecipientInformationStore recipients = ed.GetRecipientInfos();
+            RecipientInformationStore recipients = ed.GetRecipientInfos();
 
-			Assert.AreEqual(ed.EncryptionAlgOid,
-				CmsEnvelopedDataGenerator.Aes128Cbc);
+            Assert.AreEqual(ed.EncryptionAlgOid, CmsEnvelopedGenerator.Aes128Cbc);
 
-			ICollection c = recipients.GetRecipients();
+            ICollection c = recipients.GetRecipients();
 
-			Assert.AreEqual(1, c.Count);
+            Assert.AreEqual(1, c.Count);
 
-			foreach (RecipientInformation recipient in c)
-			{
-				byte[] recData = recipient.GetContent(ReciKP.Private);
-				Assert.IsTrue(Arrays.AreEqual(data, recData));
-			}
-		}
+            foreach (RecipientInformation recipient in c)
+            {
+                byte[] recData = recipient.GetContent(ReciKP.Private);
+                Assert.IsTrue(Arrays.AreEqual(data, recData));
+            }
+        }
 
-		[Test]
+        [Test]
 		public void TestKeyTransSmallAesUsingPkcs1()
 		{
 			byte[] data = new byte[] { 0, 1, 2, 3 };