diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2021-10-14 17:03:04 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2021-10-14 17:03:04 +0700 |
commit | 2b93d0982010321dbbc51ecbef9c3adfb22e7860 (patch) | |
tree | 38fbf7ced481c78429877eebd7bd05e5ac458765 /crypto/src/asn1/DerSet.cs | |
parent | Null check and reformatting (diff) | |
download | BouncyCastle.NET-ed25519-2b93d0982010321dbbc51ecbef9c3adfb22e7860.tar.xz |
Add WriteElements method
Diffstat (limited to '')
-rw-r--r-- | crypto/src/asn1/DerSet.cs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/crypto/src/asn1/DerSet.cs b/crypto/src/asn1/DerSet.cs index 0808434d7..62d8873b8 100644 --- a/crypto/src/asn1/DerSet.cs +++ b/crypto/src/asn1/DerSet.cs @@ -81,12 +81,7 @@ namespace Org.BouncyCastle.Asn1 // TODO Intermediate buffer could be avoided if we could calculate expected length MemoryStream bOut = new MemoryStream(); Asn1OutputStream dOut = Asn1OutputStream.Create(bOut, Asn1Encodable.Der); - - foreach (Asn1Encodable obj in this) - { - obj.ToAsn1Object().Encode(dOut); - } - + dOut.WriteElements(elements); dOut.Flush(); #if PORTABLE |