Skip to content

Commit 8cdb0ed

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 62680d4 + 11ca422 commit 8cdb0ed

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

crypto/Contributors.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ <h3>Code Contributors:</h3>
167167
</li>
168168
<li>
169169
<p>Nathan Douthit (https://github.com/ndouthit) - Null policy fix for TimeStampTokenGenerator</p>
170+
</li>
171+
<li>
172+
<p>fabiogermann (https://github.com/fabiogermann) - Mixed definiton support for OAEPwithSHA256andMGF1withSHA1.<p>
170173
</li>
171174
</ul>
172175
</body>

crypto/src/security/CipherUtilities.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ private enum CipherPadding
8989
OAEPWITHSHA_224ANDMGF1PADDING,
9090
OAEPWITHSHA256ANDMGF1PADDING,
9191
OAEPWITHSHA_256ANDMGF1PADDING,
92+
OAEPWITHSHA256ANDMGF1WITHSHA256PADDING,
93+
OAEPWITHSHA_256ANDMGF1WITHSHA_256PADDING,
94+
OAEPWITHSHA256ANDMGF1WITHSHA1PADDING,
95+
OAEPWITHSHA_256ANDMGF1WITHSHA_1PADDING,
9296
OAEPWITHSHA384ANDMGF1PADDING,
9397
OAEPWITHSHA_384ANDMGF1PADDING,
9498
OAEPWITHSHA512ANDMGF1PADDING,
@@ -571,8 +575,14 @@ public static IBufferedCipher GetCipher(
571575
break;
572576
case CipherPadding.OAEPWITHSHA256ANDMGF1PADDING:
573577
case CipherPadding.OAEPWITHSHA_256ANDMGF1PADDING:
578+
case CipherPadding.OAEPWITHSHA256ANDMGF1WITHSHA256PADDING:
579+
case CipherPadding.OAEPWITHSHA_256ANDMGF1WITHSHA_256PADDING:
574580
asymBlockCipher = new OaepEncoding(asymBlockCipher, new Sha256Digest());
575581
break;
582+
case CipherPadding.OAEPWITHSHA256ANDMGF1WITHSHA1PADDING:
583+
case CipherPadding.OAEPWITHSHA_256ANDMGF1WITHSHA_1PADDING:
584+
asymBlockCipher = new OaepEncoding(asymBlockCipher, new Sha256Digest(), new Sha1Digest(), null);
585+
break;
576586
case CipherPadding.OAEPWITHSHA384ANDMGF1PADDING:
577587
case CipherPadding.OAEPWITHSHA_384ANDMGF1PADDING:
578588
asymBlockCipher = new OaepEncoding(asymBlockCipher, new Sha384Digest());

0 commit comments

Comments
 (0)