[CBOR] Implement Map support for CborReader and CborWriter (#33500)
authorEirik Tsarpalis <eirik.tsarpalis@gmail.com>
Mon, 16 Mar 2020 22:00:12 +0000 (22:00 +0000)
committerGitHub <noreply@github.com>
Mon, 16 Mar 2020 22:00:12 +0000 (22:00 +0000)
commitf7e7ec6f5552d6a6444aad61426f08b7ed37116f
tree799b28a4eb41f6900ca8b0eced2e9bd8a7142267
parent74124d4eafaf0ba64c42c214be33f7f2940a0259
[CBOR] Implement Map support for CborReader and CborWriter (#33500)

* Implement map support for CborReader and CborWriter

* fix test naming

* move helper functions to nested type

* check for arithmetic overflow in CborReader.ReadStartMap

* throw FormatExceptions on data items whose definite length exceeds remaining buffer size
13 files changed:
src/libraries/System.Security.Cryptography.Encoding/tests/Cbor.Tests/CborReaderTests.Array.cs
src/libraries/System.Security.Cryptography.Encoding/tests/Cbor.Tests/CborReaderTests.Helpers.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography.Encoding/tests/Cbor.Tests/CborReaderTests.Map.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography.Encoding/tests/Cbor.Tests/CborWriterTests.Array.cs
src/libraries/System.Security.Cryptography.Encoding/tests/Cbor.Tests/CborWriterTests.Helpers.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography.Encoding/tests/Cbor.Tests/CborWriterTests.Map.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography.Encoding/tests/Cbor/CborInitialByte.cs
src/libraries/System.Security.Cryptography.Encoding/tests/Cbor/CborReader.Integer.cs
src/libraries/System.Security.Cryptography.Encoding/tests/Cbor/CborReader.Map.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography.Encoding/tests/Cbor/CborReader.cs
src/libraries/System.Security.Cryptography.Encoding/tests/Cbor/CborWriter.Integer.cs
src/libraries/System.Security.Cryptography.Encoding/tests/Cbor/CborWriter.Map.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography.Encoding/tests/System.Security.Cryptography.Encoding.Tests.csproj