From 297ccc3cc304defd9ecb0ba944bede4f89696b3b Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Fri, 14 Sep 2018 17:54:02 +0700 Subject: RFC 5958: Update PrivateKeyInfo - now supports optional 'publicKey' field --- crypto/src/util/collections/CollectionUtilities.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'crypto/src/util/collections/CollectionUtilities.cs') diff --git a/crypto/src/util/collections/CollectionUtilities.cs b/crypto/src/util/collections/CollectionUtilities.cs index 18fcb6774..cac158226 100644 --- a/crypto/src/util/collections/CollectionUtilities.cs +++ b/crypto/src/util/collections/CollectionUtilities.cs @@ -39,6 +39,14 @@ namespace Org.BouncyCastle.Utilities.Collections return new UnmodifiableSetProxy(s); } + public static object RequireNext(IEnumerator e) + { + if (!e.MoveNext()) + throw new InvalidOperationException(); + + return e.Current; + } + public static string ToString(IEnumerable c) { StringBuilder sb = new StringBuilder("["); -- cgit 1.4.1