diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2018-09-14 17:54:02 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2018-09-14 17:54:02 +0700 |
commit | 297ccc3cc304defd9ecb0ba944bede4f89696b3b (patch) | |
tree | cd76cba6a46d74fa58a4b07af0221040840a3ce7 /crypto/src/util/collections/CollectionUtilities.cs | |
parent | RFC 8032: Implement Ed25519ctx, Ed25519ph, Ed448ph variants (diff) | |
download | BouncyCastle.NET-ed25519-297ccc3cc304defd9ecb0ba944bede4f89696b3b.tar.xz |
RFC 5958: Update PrivateKeyInfo
- now supports optional 'publicKey' field
Diffstat (limited to '')
-rw-r--r-- | crypto/src/util/collections/CollectionUtilities.cs | 8 |
1 files changed, 8 insertions, 0 deletions
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("["); |