Skip to content

Commit d33d5fa

Browse files
committed
Merge branch 'master' of https://github.com/fabiogermann/bc-csharp into fabiogermann-master
2 parents 5f2a389 + 81ac720 commit d33d5fa

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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)