diff --git a/NetCore8583.Test/Builder/TestCompositeFieldBuilder.cs b/NetCore8583.Test/Builder/TestCompositeFieldBuilder.cs index cc21e15..919e09b 100644 --- a/NetCore8583.Test/Builder/TestCompositeFieldBuilder.cs +++ b/NetCore8583.Test/Builder/TestCompositeFieldBuilder.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Text; using NetCore8583.Builder; diff --git a/NetCore8583.Test/Codecs/TestBigIntBcdCodec.cs b/NetCore8583.Test/Codecs/TestBigIntBcdCodec.cs index 966a663..0364a10 100644 --- a/NetCore8583.Test/Codecs/TestBigIntBcdCodec.cs +++ b/NetCore8583.Test/Codecs/TestBigIntBcdCodec.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System.Numerics; using NetCore8583.Codecs; using Xunit; diff --git a/NetCore8583.Test/Codecs/TestCompositeFieldExtra.cs b/NetCore8583.Test/Codecs/TestCompositeFieldExtra.cs index f9b99b5..477a04b 100644 --- a/NetCore8583.Test/Codecs/TestCompositeFieldExtra.cs +++ b/NetCore8583.Test/Codecs/TestCompositeFieldExtra.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using NetCore8583.Codecs; using NetCore8583.Parse; using Xunit; diff --git a/NetCore8583.Test/Codecs/TestLongBcdCodec.cs b/NetCore8583.Test/Codecs/TestLongBcdCodec.cs index 2dcd044..783c598 100644 --- a/NetCore8583.Test/Codecs/TestLongBcdCodec.cs +++ b/NetCore8583.Test/Codecs/TestLongBcdCodec.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using NetCore8583.Codecs; using Xunit; diff --git a/NetCore8583.Test/CustomField48.cs b/NetCore8583.Test/CustomField48.cs index a11cf65..53bcd50 100644 --- a/NetCore8583.Test/CustomField48.cs +++ b/NetCore8583.Test/CustomField48.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Text; diff --git a/NetCore8583.Test/Extensions/TestArrays.cs b/NetCore8583.Test/Extensions/TestArrays.cs index 125391a..26a0da2 100644 --- a/NetCore8583.Test/Extensions/TestArrays.cs +++ b/NetCore8583.Test/Extensions/TestArrays.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using NetCore8583.Extensions; using Xunit; diff --git a/NetCore8583.Test/Extensions/TestBcd.cs b/NetCore8583.Test/Extensions/TestBcd.cs index 30dd2cb..b5b77d7 100644 --- a/NetCore8583.Test/Extensions/TestBcd.cs +++ b/NetCore8583.Test/Extensions/TestBcd.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using NetCore8583.Extensions; using Xunit; diff --git a/NetCore8583.Test/Extensions/TestBitmap128.cs b/NetCore8583.Test/Extensions/TestBitmap128.cs index 3f0c3bd..9576106 100644 --- a/NetCore8583.Test/Extensions/TestBitmap128.cs +++ b/NetCore8583.Test/Extensions/TestBitmap128.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using NetCore8583.Extensions; using Xunit; diff --git a/NetCore8583.Test/Extensions/TestBytes.cs b/NetCore8583.Test/Extensions/TestBytes.cs index 9dce497..72f7db5 100644 --- a/NetCore8583.Test/Extensions/TestBytes.cs +++ b/NetCore8583.Test/Extensions/TestBytes.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Linq; using System.Text; diff --git a/NetCore8583.Test/Extensions/TestDates.cs b/NetCore8583.Test/Extensions/TestDates.cs index 241ba8c..213b5f4 100644 --- a/NetCore8583.Test/Extensions/TestDates.cs +++ b/NetCore8583.Test/Extensions/TestDates.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using NetCore8583.Extensions; using Xunit; diff --git a/NetCore8583.Test/Extensions/TestEncodingCache.cs b/NetCore8583.Test/Extensions/TestEncodingCache.cs index fece46d..7bc90cd 100644 --- a/NetCore8583.Test/Extensions/TestEncodingCache.cs +++ b/NetCore8583.Test/Extensions/TestEncodingCache.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System.Text; using NetCore8583.Extensions; using Xunit; diff --git a/NetCore8583.Test/Extensions/TestHexCodec.cs b/NetCore8583.Test/Extensions/TestHexCodec.cs index 6a69796..29e9876 100644 --- a/NetCore8583.Test/Extensions/TestHexCodec.cs +++ b/NetCore8583.Test/Extensions/TestHexCodec.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using NetCore8583.Extensions; using Xunit; diff --git a/NetCore8583.Test/Extensions/TestOsUtil.cs b/NetCore8583.Test/Extensions/TestOsUtil.cs index 726f774..9edfd0e 100644 --- a/NetCore8583.Test/Extensions/TestOsUtil.cs +++ b/NetCore8583.Test/Extensions/TestOsUtil.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using NetCore8583.Extensions; using Xunit; diff --git a/NetCore8583.Test/Extensions/TestPerformanceComparison.cs b/NetCore8583.Test/Extensions/TestPerformanceComparison.cs index 439f2ef..39088f7 100644 --- a/NetCore8583.Test/Extensions/TestPerformanceComparison.cs +++ b/NetCore8583.Test/Extensions/TestPerformanceComparison.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Diagnostics; using System.Linq; diff --git a/NetCore8583.Test/Extensions/TestStringx.cs b/NetCore8583.Test/Extensions/TestStringx.cs index 7ea06e1..e7e24ca 100644 --- a/NetCore8583.Test/Extensions/TestStringx.cs +++ b/NetCore8583.Test/Extensions/TestStringx.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Text; using NetCore8583.Extensions; diff --git a/NetCore8583.Test/Parse/CustomBinCodecs.cs b/NetCore8583.Test/Parse/CustomBinCodecs.cs index b9f3fbd..cad3215 100644 --- a/NetCore8583.Test/Parse/CustomBinCodecs.cs +++ b/NetCore8583.Test/Parse/CustomBinCodecs.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Collections.Generic; using System.Numerics; diff --git a/NetCore8583.Test/Parse/TestAlphaParseInfo.cs b/NetCore8583.Test/Parse/TestAlphaParseInfo.cs index 7690733..c0f400c 100644 --- a/NetCore8583.Test/Parse/TestAlphaParseInfo.cs +++ b/NetCore8583.Test/Parse/TestAlphaParseInfo.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System.Text; using NetCore8583.Extensions; using NetCore8583.Parse; diff --git a/NetCore8583.Test/Parse/TestAmountParseInfo.cs b/NetCore8583.Test/Parse/TestAmountParseInfo.cs index 6001fed..9ed72f5 100644 --- a/NetCore8583.Test/Parse/TestAmountParseInfo.cs +++ b/NetCore8583.Test/Parse/TestAmountParseInfo.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System.Text; using NetCore8583.Extensions; using NetCore8583.Parse; diff --git a/NetCore8583.Test/Parse/TestBinaryParseInfo.cs b/NetCore8583.Test/Parse/TestBinaryParseInfo.cs index 6f3f72a..103665a 100644 --- a/NetCore8583.Test/Parse/TestBinaryParseInfo.cs +++ b/NetCore8583.Test/Parse/TestBinaryParseInfo.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System.Text; using NetCore8583.Extensions; using NetCore8583.Parse; diff --git a/NetCore8583.Test/Parse/TestComposites.cs b/NetCore8583.Test/Parse/TestComposites.cs index 03cf735..c027b45 100644 --- a/NetCore8583.Test/Parse/TestComposites.cs +++ b/NetCore8583.Test/Parse/TestComposites.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System.Text; using NetCore8583.Codecs; using NetCore8583.Parse; diff --git a/NetCore8583.Test/Parse/TestConfigParserUnit.cs b/NetCore8583.Test/Parse/TestConfigParserUnit.cs index 9e2b146..609cf0d 100644 --- a/NetCore8583.Test/Parse/TestConfigParserUnit.cs +++ b/NetCore8583.Test/Parse/TestConfigParserUnit.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.IO; using System.Text; diff --git a/NetCore8583.Test/Parse/TestDate12ParseInfo.cs b/NetCore8583.Test/Parse/TestDate12ParseInfo.cs index 9727074..cd886be 100644 --- a/NetCore8583.Test/Parse/TestDate12ParseInfo.cs +++ b/NetCore8583.Test/Parse/TestDate12ParseInfo.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Text; using NetCore8583.Extensions; diff --git a/NetCore8583.Test/Parse/TestDate14ParseInfo.cs b/NetCore8583.Test/Parse/TestDate14ParseInfo.cs index d00a901..d8ad431 100644 --- a/NetCore8583.Test/Parse/TestDate14ParseInfo.cs +++ b/NetCore8583.Test/Parse/TestDate14ParseInfo.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Text; using NetCore8583.Extensions; diff --git a/NetCore8583.Test/Parse/TestDate6ParseInfo.cs b/NetCore8583.Test/Parse/TestDate6ParseInfo.cs index c832245..f728f1a 100644 --- a/NetCore8583.Test/Parse/TestDate6ParseInfo.cs +++ b/NetCore8583.Test/Parse/TestDate6ParseInfo.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Text; using NetCore8583.Extensions; diff --git a/NetCore8583.Test/Parse/TestDates.cs b/NetCore8583.Test/Parse/TestDates.cs index f925fc1..5a0f1bf 100644 --- a/NetCore8583.Test/Parse/TestDates.cs +++ b/NetCore8583.Test/Parse/TestDates.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.IO; using NetCore8583.Extensions; diff --git a/NetCore8583.Test/Parse/TestEmptyLvars.cs b/NetCore8583.Test/Parse/TestEmptyLvars.cs index a9c0782..710db45 100644 --- a/NetCore8583.Test/Parse/TestEmptyLvars.cs +++ b/NetCore8583.Test/Parse/TestEmptyLvars.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using NetCore8583.Extensions; using Xunit; diff --git a/NetCore8583.Test/Parse/TestEncoding.cs b/NetCore8583.Test/Parse/TestEncoding.cs index 172703c..3380710 100644 --- a/NetCore8583.Test/Parse/TestEncoding.cs +++ b/NetCore8583.Test/Parse/TestEncoding.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System.Text; using NetCore8583.Extensions; using NetCore8583.Parse; diff --git a/NetCore8583.Test/Parse/TestLlbinLllbinParseInfo.cs b/NetCore8583.Test/Parse/TestLlbinLllbinParseInfo.cs index 835ea64..7957298 100644 --- a/NetCore8583.Test/Parse/TestLlbinLllbinParseInfo.cs +++ b/NetCore8583.Test/Parse/TestLlbinLllbinParseInfo.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System.Text; using NetCore8583.Extensions; using NetCore8583.Parse; diff --git a/NetCore8583.Test/Parse/TestLlllbinParseInfo.cs b/NetCore8583.Test/Parse/TestLlllbinParseInfo.cs index afeeba1..615666e 100644 --- a/NetCore8583.Test/Parse/TestLlllbinParseInfo.cs +++ b/NetCore8583.Test/Parse/TestLlllbinParseInfo.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System.Text; using NetCore8583.Extensions; using NetCore8583.Parse; diff --git a/NetCore8583.Test/Parse/TestLlllvarParseInfo.cs b/NetCore8583.Test/Parse/TestLlllvarParseInfo.cs index 4af283c..7d68a8c 100644 --- a/NetCore8583.Test/Parse/TestLlllvarParseInfo.cs +++ b/NetCore8583.Test/Parse/TestLlllvarParseInfo.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System.Text; using NetCore8583.Extensions; using NetCore8583.Parse; diff --git a/NetCore8583.Test/Parse/TestLllvarParseInfo.cs b/NetCore8583.Test/Parse/TestLllvarParseInfo.cs index 10de3ef..bb8087a 100644 --- a/NetCore8583.Test/Parse/TestLllvarParseInfo.cs +++ b/NetCore8583.Test/Parse/TestLllvarParseInfo.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System.Text; using NetCore8583.Extensions; using NetCore8583.Parse; diff --git a/NetCore8583.Test/Parse/TestLlvarParseInfo.cs b/NetCore8583.Test/Parse/TestLlvarParseInfo.cs index cae9592..59e9e89 100644 --- a/NetCore8583.Test/Parse/TestLlvarParseInfo.cs +++ b/NetCore8583.Test/Parse/TestLlvarParseInfo.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System.Text; using NetCore8583.Extensions; using NetCore8583.Parse; diff --git a/NetCore8583.Test/Parse/TestNumericParseInfo.cs b/NetCore8583.Test/Parse/TestNumericParseInfo.cs index 038cb49..25a8f25 100644 --- a/NetCore8583.Test/Parse/TestNumericParseInfo.cs +++ b/NetCore8583.Test/Parse/TestNumericParseInfo.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System.Numerics; using System.Text; using NetCore8583.Extensions; diff --git a/NetCore8583.Test/TestBinaries.cs b/NetCore8583.Test/TestBinaries.cs index d9528af..7f206ab 100644 --- a/NetCore8583.Test/TestBinaries.cs +++ b/NetCore8583.Test/TestBinaries.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Globalization; using System.Text; diff --git a/NetCore8583.Test/TestConfigParser.cs b/NetCore8583.Test/TestConfigParser.cs index 9a4cf0c..c835953 100644 --- a/NetCore8583.Test/TestConfigParser.cs +++ b/NetCore8583.Test/TestConfigParser.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Text; using NetCore8583.Codecs; diff --git a/NetCore8583.Test/TestEbcdic.cs b/NetCore8583.Test/TestEbcdic.cs index ddfa764..66cd353 100644 --- a/NetCore8583.Test/TestEbcdic.cs +++ b/NetCore8583.Test/TestEbcdic.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Collections.Generic; using System.IO; diff --git a/NetCore8583.Test/TestFormats.cs b/NetCore8583.Test/TestFormats.cs index 42c4d7d..6f914e1 100644 --- a/NetCore8583.Test/TestFormats.cs +++ b/NetCore8583.Test/TestFormats.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using TimeZoneConverter; using Xunit; diff --git a/NetCore8583.Test/TestHeaders.cs b/NetCore8583.Test/TestHeaders.cs index f8c226a..e495ca4 100644 --- a/NetCore8583.Test/TestHeaders.cs +++ b/NetCore8583.Test/TestHeaders.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System.Text; using Xunit; diff --git a/NetCore8583.Test/TestIsoMessage.cs b/NetCore8583.Test/TestIsoMessage.cs index df4770b..0383315 100644 --- a/NetCore8583.Test/TestIsoMessage.cs +++ b/NetCore8583.Test/TestIsoMessage.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Collections.Generic; using System.IO; diff --git a/NetCore8583.Test/TestIsoMessageExtra.cs b/NetCore8583.Test/TestIsoMessageExtra.cs index fa88f73..ad89c11 100644 --- a/NetCore8583.Test/TestIsoMessageExtra.cs +++ b/NetCore8583.Test/TestIsoMessageExtra.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System.Collections.Generic; using System.Text; using Xunit; diff --git a/NetCore8583.Test/TestIsoTypeHelper.cs b/NetCore8583.Test/TestIsoTypeHelper.cs index 06afebe..c41aad0 100644 --- a/NetCore8583.Test/TestIsoTypeHelper.cs +++ b/NetCore8583.Test/TestIsoTypeHelper.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using Xunit; diff --git a/NetCore8583.Test/TestIsoValue.cs b/NetCore8583.Test/TestIsoValue.cs index 25fb768..5515317 100644 --- a/NetCore8583.Test/TestIsoValue.cs +++ b/NetCore8583.Test/TestIsoValue.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.IO; using System.Numerics; diff --git a/NetCore8583.Test/TestIssue15.cs b/NetCore8583.Test/TestIssue15.cs index 0aafc37..0eed75b 100644 --- a/NetCore8583.Test/TestIssue15.cs +++ b/NetCore8583.Test/TestIssue15.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using NetCore8583.Extensions; using NetCore8583.Parse; using Xunit; diff --git a/NetCore8583.Test/TestIssue4.cs b/NetCore8583.Test/TestIssue4.cs index c8eedc6..597f628 100644 --- a/NetCore8583.Test/TestIssue4.cs +++ b/NetCore8583.Test/TestIssue4.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.IO; using NetCore8583.Extensions; diff --git a/NetCore8583.Test/TestLlll.cs b/NetCore8583.Test/TestLlll.cs index a5a2e89..7979055 100644 --- a/NetCore8583.Test/TestLlll.cs +++ b/NetCore8583.Test/TestLlll.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using NetCore8583.Extensions; using Xunit; diff --git a/NetCore8583.Test/TestLlllPatch.cs b/NetCore8583.Test/TestLlllPatch.cs index 03e4468..8909b81 100644 --- a/NetCore8583.Test/TestLlllPatch.cs +++ b/NetCore8583.Test/TestLlllPatch.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System.Collections.Generic; using System.IO; using System.Text; diff --git a/NetCore8583.Test/TestMessageFactoryBuilder.cs b/NetCore8583.Test/TestMessageFactoryBuilder.cs index 5fabfd3..c5d645e 100644 --- a/NetCore8583.Test/TestMessageFactoryBuilder.cs +++ b/NetCore8583.Test/TestMessageFactoryBuilder.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System.Text; using NetCore8583.Builder; using NetCore8583.Codecs; diff --git a/NetCore8583.Test/TestParsing.cs b/NetCore8583.Test/TestParsing.cs index 6c759eb..1faec1c 100644 --- a/NetCore8583.Test/TestParsing.cs +++ b/NetCore8583.Test/TestParsing.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Text; using NetCore8583.Extensions; diff --git a/NetCore8583.Test/TestRadix.cs b/NetCore8583.Test/TestRadix.cs index 3373484..da5afd1 100644 --- a/NetCore8583.Test/TestRadix.cs +++ b/NetCore8583.Test/TestRadix.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using NetCore8583.Extensions; using Xunit; diff --git a/NetCore8583.Test/Tlv/TestEmvTags.cs b/NetCore8583.Test/Tlv/TestEmvTags.cs new file mode 100644 index 0000000..7185bfa --- /dev/null +++ b/NetCore8583.Test/Tlv/TestEmvTags.cs @@ -0,0 +1,84 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +using NetCore8583.Tlv; +using Xunit; + +namespace NetCore8583.Test.Tlv +{ + public class TestEmvTags + { + [Theory] + [InlineData("9F26", "Application Cryptogram")] + [InlineData("9F27", "Cryptogram Information Data")] + [InlineData("9F10", "Issuer Application Data")] + [InlineData("9F37", "Unpredictable Number")] + [InlineData("9F36", "Application Transaction Counter (ATC)")] + [InlineData("95", "Terminal Verification Results")] + [InlineData("9A", "Transaction Date")] + [InlineData("9C", "Transaction Type")] + [InlineData("5F2A", "Transaction Currency Code")] + [InlineData("82", "Application Interchange Profile")] + [InlineData("9F1A", "Terminal Country Code")] + [InlineData("9F03", "Amount, Other (Numeric)")] + [InlineData("9F33", "Terminal Capabilities")] + [InlineData("9F34", "Cardholder Verification Method (CVM) Results")] + [InlineData("9F35", "Terminal Type")] + [InlineData("9F09", "Application Version Number (Terminal)")] + [InlineData("84", "Dedicated File (DF) Name")] + public void KnownTagsHaveDescriptions(string tag, string expectedDescription) + { + Assert.Equal(expectedDescription, EmvTags.GetDescription(tag)); + } + + [Fact] + public void CaseInsensitiveLookup() + { + Assert.Equal("Application Cryptogram", EmvTags.GetDescription("9f26")); + Assert.Equal("Application Cryptogram", EmvTags.GetDescription("9F26")); + } + + [Fact] + public void UnknownTagReturnsNull() + { + Assert.Null(EmvTags.GetDescription("FF99")); + } + + [Fact] + public void DictionaryContainsAllRequiredTags() + { + string[] requiredTags = + { + "9F26", "9F27", "9F10", "9F37", "9F36", + "95", "9A", "9C", "5F2A", "82", + "9F1A", "9F03", "9F33", "9F34", "9F35", + "9F09", "84" + }; + + foreach (var tag in requiredTags) + { + Assert.True(EmvTags.Descriptions.ContainsKey(tag), + $"Tag {tag} should be in the EMV dictionary."); + } + } + } +} diff --git a/NetCore8583.Test/Tlv/TestIsoMessageTlvExtensions.cs b/NetCore8583.Test/Tlv/TestIsoMessageTlvExtensions.cs new file mode 100644 index 0000000..5e57b3d --- /dev/null +++ b/NetCore8583.Test/Tlv/TestIsoMessageTlvExtensions.cs @@ -0,0 +1,174 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +using System; +using System.Collections.Generic; +using NetCore8583.Tlv; +using Xunit; + +namespace NetCore8583.Test.Tlv +{ + public class TestIsoMessageTlvExtensions + { + [Fact] + public void SetAndGetTlvTags() + { + var msg = new IsoMessage { Type = 0x0100 }; + var tags = new List + { + new("9F26", 8, new byte[] { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 }), + new("9F27", 1, new byte[] { 0x80 }), + new("82", 2, new byte[] { 0x19, 0x80 }) + }; + + msg.SetTlvTags(tags); + + Assert.True(msg.HasField(55)); + + var retrieved = msg.GetTlvTags(); + Assert.NotNull(retrieved); + Assert.Equal(3, retrieved.Count); + Assert.Equal("9F26", retrieved[0].Tag); + Assert.Equal("9F27", retrieved[1].Tag); + Assert.Equal("82", retrieved[2].Tag); + } + + [Fact] + public void GetTlvTagsFromByteArrayField() + { + var msg = new IsoMessage { Type = 0x0100 }; + var tlvBytes = new byte[] { 0x82, 0x02, 0x19, 0x80 }; + msg.SetValue(55, tlvBytes, IsoType.LLLBIN, tlvBytes.Length); + + var tags = msg.GetTlvTags(); + + Assert.NotNull(tags); + Assert.Single(tags); + Assert.Equal("82", tags[0].Tag); + } + + [Fact] + public void GetTlvTagsFromHexStringField() + { + var msg = new IsoMessage { Type = 0x0100 }; + msg.SetValue(55, "82021980", IsoType.LLLVAR, 0); + + var tags = msg.GetTlvTags(); + + Assert.NotNull(tags); + Assert.Single(tags); + Assert.Equal("82", tags[0].Tag); + } + + [Fact] + public void GetTlvTagsReturnsNullWhenFieldNotPresent() + { + var msg = new IsoMessage { Type = 0x0100 }; + Assert.Null(msg.GetTlvTags()); + } + + [Fact] + public void GetTlvBytesRoundTrip() + { + var msg = new IsoMessage { Type = 0x0100 }; + var tags = new List + { + new("9F27", 1, new byte[] { 0x80 }), + new("82", 2, new byte[] { 0x19, 0x80 }) + }; + + msg.SetTlvTags(tags); + + var bytes = msg.GetTlvBytes(); + Assert.NotNull(bytes); + + var reparsed = TlvParser.Parse(bytes); + Assert.Equal(2, reparsed.Count); + Assert.Equal("9F27", reparsed[0].Tag); + Assert.Equal("82", reparsed[1].Tag); + } + + [Fact] + public void FindTlvTag() + { + var msg = new IsoMessage { Type = 0x0100 }; + var tags = new List + { + new("9F26", 8, new byte[] { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 }), + new("9F27", 1, new byte[] { 0x80 }), + new("82", 2, new byte[] { 0x19, 0x80 }) + }; + msg.SetTlvTags(tags); + + var found = msg.FindTlvTag("9F27"); + Assert.NotNull(found); + Assert.Equal("9F27", found.Tag); + Assert.Equal(new byte[] { 0x80 }, found.Value); + } + + [Fact] + public void FindTlvTagCaseInsensitive() + { + var msg = new IsoMessage { Type = 0x0100 }; + var tags = new List + { + new("9F26", 8, new byte[8]) + }; + msg.SetTlvTags(tags); + + Assert.NotNull(msg.FindTlvTag("9f26")); + Assert.NotNull(msg.FindTlvTag("9F26")); + } + + [Fact] + public void FindTlvTagReturnsNullWhenNotFound() + { + var msg = new IsoMessage { Type = 0x0100 }; + var tags = new List + { + new("82", 2, new byte[] { 0x19, 0x80 }) + }; + msg.SetTlvTags(tags); + + Assert.Null(msg.FindTlvTag("9F26")); + } + + [Fact] + public void SetTlvTagsOnCustomFieldNumber() + { + var msg = new IsoMessage { Type = 0x0100 }; + var tags = new List + { + new("82", 2, new byte[] { 0x19, 0x80 }) + }; + + msg.SetTlvTags(tags, fieldNumber: 62); + + Assert.True(msg.HasField(62)); + Assert.False(msg.HasField(55)); + + var retrieved = msg.GetTlvTags(62); + Assert.NotNull(retrieved); + Assert.Single(retrieved); + } + } +} diff --git a/NetCore8583.Test/Tlv/TestTlvBuilder.cs b/NetCore8583.Test/Tlv/TestTlvBuilder.cs new file mode 100644 index 0000000..b75d821 --- /dev/null +++ b/NetCore8583.Test/Tlv/TestTlvBuilder.cs @@ -0,0 +1,172 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +using System; +using NetCore8583.Tlv; +using Xunit; + +namespace NetCore8583.Test.Tlv +{ + public class TestTlvBuilder + { + [Fact] + public void BuildSingleTag() + { + var result = new TlvBuilder() + .AddTag("82", new byte[] { 0x19, 0x80 }) + .Build(); + + Assert.Equal(new byte[] { 0x82, 0x02, 0x19, 0x80 }, result); + } + + [Fact] + public void BuildMultiByteTag() + { + var value = new byte[] { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 }; + var result = new TlvBuilder() + .AddTag("9F26", value) + .Build(); + + var expected = new byte[2 + 1 + 8]; + expected[0] = 0x9F; + expected[1] = 0x26; + expected[2] = 0x08; + Array.Copy(value, 0, expected, 3, 8); + + Assert.Equal(expected, result); + } + + [Fact] + public void BuildMultipleTags() + { + var result = new TlvBuilder() + .AddTag("9A", new byte[] { 0x23, 0x01, 0x15 }) + .AddTag("9C", new byte[] { 0x00 }) + .AddTag("5F2A", new byte[] { 0x08, 0x40 }) + .Build(); + + var expected = new byte[] + { + 0x9A, 0x03, 0x23, 0x01, 0x15, + 0x9C, 0x01, 0x00, + 0x5F, 0x2A, 0x02, 0x08, 0x40 + }; + + Assert.Equal(expected, result); + } + + [Fact] + public void BuildLongFormLengthOneByte() + { + var value = new byte[200]; + var result = new TlvBuilder() + .AddTag("9F10", value) + .Build(); + + Assert.Equal(0x9F, result[0]); + Assert.Equal(0x10, result[1]); + Assert.Equal(0x81, result[2]); // long form marker + Assert.Equal(0xC8, result[3]); // 200 + Assert.Equal(2 + 2 + 200, result.Length); + } + + [Fact] + public void BuildLongFormLengthTwoBytes() + { + var value = new byte[300]; + var result = new TlvBuilder() + .AddTag("9F10", value) + .Build(); + + Assert.Equal(0x9F, result[0]); + Assert.Equal(0x10, result[1]); + Assert.Equal(0x82, result[2]); + Assert.Equal(0x01, result[3]); // 300 >> 8 + Assert.Equal(0x2C, result[4]); // 300 & 0xFF + Assert.Equal(2 + 3 + 300, result.Length); + } + + [Fact] + public void BuildEmptyValue() + { + var result = new TlvBuilder() + .AddTag("9C", Array.Empty()) + .Build(); + + Assert.Equal(new byte[] { 0x9C, 0x00 }, result); + } + + [Fact] + public void BuildFromTlvTag() + { + var tag = new TlvTag("9F27", 1, new byte[] { 0x80 }, "Cryptogram Information Data"); + var result = new TlvBuilder() + .AddTag(tag) + .Build(); + + Assert.Equal(new byte[] { 0x9F, 0x27, 0x01, 0x80 }, result); + } + + [Fact] + public void BuildFromRawBytes() + { + var result = new TlvBuilder() + .AddTag(new byte[] { 0x9F, 0x26 }, new byte[] { 0xAA, 0xBB }) + .Build(); + + Assert.Equal(new byte[] { 0x9F, 0x26, 0x02, 0xAA, 0xBB }, result); + } + + [Fact] + public void BuildNoTagsReturnsEmpty() + { + var result = new TlvBuilder().Build(); + Assert.Empty(result); + } + + [Fact] + public void AddTagNullTagStringThrows() + { + Assert.Throws(() => new TlvBuilder().AddTag((string)null, new byte[] { 0x00 })); + } + + [Fact] + public void AddTagNullValueThrows() + { + Assert.Throws(() => new TlvBuilder().AddTag("82", null)); + } + + [Fact] + public void AddTagEmptyTagStringThrows() + { + Assert.Throws(() => new TlvBuilder().AddTag("", new byte[] { 0x00 })); + } + + [Fact] + public void FluentChainingWorks() + { + var builder = new TlvBuilder(); + var returned = builder.AddTag("82", new byte[] { 0x19, 0x80 }); + Assert.Same(builder, returned); + } + } +} diff --git a/NetCore8583.Test/Tlv/TestTlvField.cs b/NetCore8583.Test/Tlv/TestTlvField.cs new file mode 100644 index 0000000..2b79268 --- /dev/null +++ b/NetCore8583.Test/Tlv/TestTlvField.cs @@ -0,0 +1,129 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +using System; +using System.Collections.Generic; +using NetCore8583.Tlv; +using Xunit; + +namespace NetCore8583.Test.Tlv +{ + public class TestTlvField + { + private readonly TlvField _field = new(); + + [Fact] + public void DecodeFieldFromHexString() + { + var hex = "9F270180" + "82021980"; + var result = _field.DecodeField(hex); + + var tags = Assert.IsAssignableFrom>(result); + Assert.Equal(2, tags.Count); + Assert.Equal("9F27", tags[0].Tag); + Assert.Equal("82", tags[1].Tag); + } + + [Fact] + public void EncodeFieldToHexString() + { + IReadOnlyList tags = new List + { + new("9F27", 1, new byte[] { 0x80 }), + new("82", 2, new byte[] { 0x19, 0x80 }) + }; + + var hex = _field.EncodeField(tags); + + Assert.Equal("9F270180" + "82021980", hex); + } + + [Fact] + public void DecodeBinaryField() + { + var raw = new sbyte[] { unchecked((sbyte)0x9F), 0x27, 0x01, unchecked((sbyte)0x80) }; + var result = _field.DecodeBinaryField(raw, 0, raw.Length); + + var tags = Assert.IsAssignableFrom>(result); + Assert.Single(tags); + Assert.Equal("9F27", tags[0].Tag); + } + + [Fact] + public void DecodeBinaryFieldWithOffset() + { + var raw = new sbyte[] { 0x00, 0x00, unchecked((sbyte)0x82), 0x02, 0x19, unchecked((sbyte)0x80) }; + var result = _field.DecodeBinaryField(raw, 2, 4); + + var tags = Assert.IsAssignableFrom>(result); + Assert.Single(tags); + Assert.Equal("82", tags[0].Tag); + } + + [Fact] + public void EncodeBinaryField() + { + IReadOnlyList tags = new List + { + new("82", 2, new byte[] { 0x19, 0x80 }) + }; + + var result = _field.EncodeBinaryField(tags); + + Assert.Equal(4, result.Length); + Assert.Equal(unchecked((sbyte)0x82), result[0]); + Assert.Equal((sbyte)0x02, result[1]); + Assert.Equal((sbyte)0x19, result[2]); + Assert.Equal(unchecked((sbyte)0x80), result[3]); + } + + [Fact] + public void DecodeEmptyStringReturnsEmptyList() + { + var result = _field.DecodeField(""); + var tags = Assert.IsAssignableFrom>(result); + Assert.Empty(tags); + } + + [Fact] + public void EncodeEmptyListReturnsEmptyString() + { + var result = _field.EncodeField(new List()); + Assert.Equal(string.Empty, result); + } + + [Fact] + public void DecodeBinaryZeroLengthReturnsEmptyList() + { + var result = _field.DecodeBinaryField(Array.Empty(), 0, 0); + var tags = Assert.IsAssignableFrom>(result); + Assert.Empty(tags); + } + + [Fact] + public void EncodeBinaryEmptyReturnsEmptyArray() + { + var result = _field.EncodeBinaryField(new List()); + Assert.Empty(result); + } + } +} diff --git a/NetCore8583.Test/Tlv/TestTlvParser.cs b/NetCore8583.Test/Tlv/TestTlvParser.cs new file mode 100644 index 0000000..5b6ce49 --- /dev/null +++ b/NetCore8583.Test/Tlv/TestTlvParser.cs @@ -0,0 +1,292 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +using System; +using System.Collections.Generic; +using NetCore8583.Tlv; +using Xunit; + +namespace NetCore8583.Test.Tlv +{ + public class TestTlvParser + { + [Fact] + public void ParseSingleByteTag() + { + // Tag 82 (Application Interchange Profile), 2 bytes value + var data = new byte[] { 0x82, 0x02, 0x19, 0x80 }; + var tags = TlvParser.Parse(data); + + Assert.Single(tags); + Assert.Equal("82", tags[0].Tag); + Assert.Equal(2, tags[0].Length); + Assert.Equal(new byte[] { 0x19, 0x80 }, tags[0].Value); + Assert.Equal("Application Interchange Profile", tags[0].Description); + } + + [Fact] + public void ParseMultiByteTag() + { + // Tag 9F26 (Application Cryptogram), 8 bytes value + var value = new byte[] { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 }; + var data = new byte[2 + 1 + 8]; + data[0] = 0x9F; + data[1] = 0x26; + data[2] = 0x08; + Array.Copy(value, 0, data, 3, 8); + + var tags = TlvParser.Parse(data); + + Assert.Single(tags); + Assert.Equal("9F26", tags[0].Tag); + Assert.Equal(8, tags[0].Length); + Assert.Equal(value, tags[0].Value); + Assert.Equal("Application Cryptogram", tags[0].Description); + } + + [Fact] + public void ParseMultipleTags() + { + // 9A (Transaction Date, 3 bytes) + 9C (Transaction Type, 1 byte) + 5F2A (Currency Code, 2 bytes) + var data = new byte[] + { + 0x9A, 0x03, 0x23, 0x01, 0x15, // 9A = 230115 + 0x9C, 0x01, 0x00, // 9C = 00 + 0x5F, 0x2A, 0x02, 0x08, 0x40 // 5F2A = 0840 + }; + + var tags = TlvParser.Parse(data); + + Assert.Equal(3, tags.Count); + + Assert.Equal("9A", tags[0].Tag); + Assert.Equal(3, tags[0].Length); + Assert.Equal("Transaction Date", tags[0].Description); + + Assert.Equal("9C", tags[1].Tag); + Assert.Equal(1, tags[1].Length); + Assert.Equal("Transaction Type", tags[1].Description); + + Assert.Equal("5F2A", tags[2].Tag); + Assert.Equal(2, tags[2].Length); + Assert.Equal("Transaction Currency Code", tags[2].Description); + } + + [Fact] + public void ParseMultiByteLengthShortForm() + { + // Tag 95 (TVR), length = 5 (short form, single byte) + var data = new byte[] { 0x95, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00 }; + var tags = TlvParser.Parse(data); + + Assert.Single(tags); + Assert.Equal("95", tags[0].Tag); + Assert.Equal(5, tags[0].Length); + } + + [Fact] + public void ParseMultiByteLengthLongFormOneByte() + { + // Tag 9F10 with length = 200 (0x81, 0xC8) + var value = new byte[200]; + new Random(42).NextBytes(value); + var data = new byte[2 + 2 + 200]; + data[0] = 0x9F; + data[1] = 0x10; + data[2] = 0x81; // long form, 1 subsequent byte + data[3] = 0xC8; // 200 + Array.Copy(value, 0, data, 4, 200); + + var tags = TlvParser.Parse(data); + + Assert.Single(tags); + Assert.Equal("9F10", tags[0].Tag); + Assert.Equal(200, tags[0].Length); + Assert.Equal(value, tags[0].Value); + } + + [Fact] + public void ParseMultiByteLengthLongFormTwoBytes() + { + // Tag 9F10 with length = 300 (0x82, 0x01, 0x2C) + var value = new byte[300]; + new Random(42).NextBytes(value); + var data = new byte[2 + 3 + 300]; + data[0] = 0x9F; + data[1] = 0x10; + data[2] = 0x82; + data[3] = 0x01; + data[4] = 0x2C; + Array.Copy(value, 0, data, 5, 300); + + var tags = TlvParser.Parse(data); + + Assert.Single(tags); + Assert.Equal("9F10", tags[0].Tag); + Assert.Equal(300, tags[0].Length); + } + + [Fact] + public void ParseConstructedTag() + { + // Tag 70 (EMV Proprietary Template) is constructed (bit 6 set: 0x70 = 0111_0000) + // Contains nested: 9F27 (1 byte) + 9F36 (2 bytes) + var innerData = new byte[] + { + 0x9F, 0x27, 0x01, 0x80, // CID = 0x80 + 0x9F, 0x36, 0x02, 0x00, 0x01 // ATC = 0001 + }; + + var data = new byte[1 + 1 + innerData.Length]; + data[0] = 0x70; + data[1] = (byte)innerData.Length; + Array.Copy(innerData, 0, data, 2, innerData.Length); + + var tags = TlvParser.Parse(data); + + Assert.Single(tags); + Assert.Equal("70", tags[0].Tag); + Assert.True(tags[0].IsConstructed); + + var nested = tags[0].GetNestedTags(); + Assert.Equal(2, nested.Count); + Assert.Equal("9F27", nested[0].Tag); + Assert.Equal("Cryptogram Information Data", nested[0].Description); + Assert.Equal("9F36", nested[1].Tag); + Assert.Equal("Application Transaction Counter (ATC)", nested[1].Description); + } + + [Fact] + public void ParseSkipsPaddingBytes() + { + // 0x00 padding + tag 82 + 0xFF padding + tag 95 + var data = new byte[] + { + 0x00, // padding + 0x82, 0x02, 0x19, 0x80, // AIP + 0xFF, // padding + 0x95, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00 // TVR + }; + + var tags = TlvParser.Parse(data); + + Assert.Equal(2, tags.Count); + Assert.Equal("82", tags[0].Tag); + Assert.Equal("95", tags[1].Tag); + } + + [Fact] + public void ParseEmptyDataReturnsEmptyList() + { + var tags = TlvParser.Parse(Array.Empty()); + Assert.Empty(tags); + } + + [Fact] + public void ParseNullDataThrows() + { + Assert.Throws(() => TlvParser.Parse((byte[])null)); + } + + [Fact] + public void ParseTruncatedTagThrows() + { + // Multi-byte tag that starts but data ends before tag is complete + var data = new byte[] { 0x9F }; + Assert.Throws(() => TlvParser.Parse(data)); + } + + [Fact] + public void ParseTruncatedLengthThrows() + { + // Tag is complete but length field is truncated + var data = new byte[] { 0x82, 0x82 }; // long form says 2 bytes follow, but none do + Assert.Throws(() => TlvParser.Parse(data)); + } + + [Fact] + public void ParseTruncatedValueThrows() + { + // Tag + length declare 5 bytes but only 2 are present + var data = new byte[] { 0x95, 0x05, 0x01, 0x02 }; + Assert.Throws(() => TlvParser.Parse(data)); + } + + [Fact] + public void ParseRealWorldEmvField55() + { + // Simulated real EMV field 55 data + var hex = "9F2608" + "A1B2C3D4E5F60708" + + "9F2701" + "80" + + "9F1007" + "06010A03A4B000" + + "9F3704" + "DEADBEEF" + + "9F3602" + "0042" + + "9505" + "0000080000" + + "9A03" + "260401" + + "9C01" + "00" + + "5F2A02" + "0840" + + "8202" + "1980" + + "9F1A02" + "0840" + + "9F0306" + "000000000000" + + "9F3303" + "E0F0C8" + + "9F3403" + "020000" + + "9F3501" + "22" + + "9F0902" + "008C" + + "8407" + "A0000000041010"; + + var data = Convert.FromHexString(hex); + var tags = TlvParser.Parse(data); + + Assert.Equal(17, tags.Count); + + Assert.Equal("9F26", tags[0].Tag); + Assert.Equal("Application Cryptogram", tags[0].Description); + + Assert.Equal("84", tags[16].Tag); + Assert.Equal("Dedicated File (DF) Name", tags[16].Description); + } + + [Fact] + public void ParseThreeByteTag() + { + // Construct a 3-byte tag: first byte has low 5 bits = 0x1F, + // second byte has bit 8 set (continuation), third byte has bit 8 clear (last) + // Tag = DF8101, length 2, value = 0x0102 + var data = new byte[] { 0xDF, 0x81, 0x01, 0x02, 0x01, 0x02 }; + + var tags = TlvParser.Parse(data); + + Assert.Single(tags); + Assert.Equal("DF8101", tags[0].Tag); + Assert.Equal(2, tags[0].Length); + Assert.Equal(new byte[] { 0x01, 0x02 }, tags[0].Value); + } + + [Fact] + public void GetNestedTagsThrowsOnPrimitive() + { + var tag = new TlvTag("9F26", 8, new byte[8]); + Assert.False(tag.IsConstructed); + Assert.Throws(() => tag.GetNestedTags()); + } + } +} diff --git a/NetCore8583.Test/Tlv/TestTlvRoundTrip.cs b/NetCore8583.Test/Tlv/TestTlvRoundTrip.cs new file mode 100644 index 0000000..b92f74d --- /dev/null +++ b/NetCore8583.Test/Tlv/TestTlvRoundTrip.cs @@ -0,0 +1,179 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +using System; +using NetCore8583.Tlv; +using Xunit; + +namespace NetCore8583.Test.Tlv +{ + public class TestTlvRoundTrip + { + [Fact] + public void RoundTripSingleByteTag() + { + var original = new byte[] { 0x82, 0x02, 0x19, 0x80 }; + var tags = TlvParser.Parse(original); + + var rebuilt = new TlvBuilder(); + foreach (var tag in tags) rebuilt.AddTag(tag); + var result = rebuilt.Build(); + + Assert.Equal(original, result); + } + + [Fact] + public void RoundTripMultiByteTag() + { + var original = new byte[] + { + 0x9F, 0x26, 0x08, + 0xA1, 0xB2, 0xC3, 0xD4, 0xE5, 0xF6, 0x07, 0x08 + }; + + var tags = TlvParser.Parse(original); + var rebuilt = new TlvBuilder(); + foreach (var tag in tags) rebuilt.AddTag(tag); + + Assert.Equal(original, rebuilt.Build()); + } + + [Fact] + public void RoundTripMultipleTags() + { + var original = new byte[] + { + 0x9A, 0x03, 0x23, 0x01, 0x15, + 0x9C, 0x01, 0x00, + 0x5F, 0x2A, 0x02, 0x08, 0x40, + 0x9F, 0x26, 0x08, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x82, 0x02, 0x19, 0x80, + 0x95, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00 + }; + + var tags = TlvParser.Parse(original); + Assert.Equal(6, tags.Count); + + var rebuilt = new TlvBuilder(); + foreach (var tag in tags) rebuilt.AddTag(tag); + + Assert.Equal(original, rebuilt.Build()); + } + + [Fact] + public void RoundTripConstructedTag() + { + var inner = new byte[] + { + 0x9F, 0x27, 0x01, 0x80, + 0x9F, 0x36, 0x02, 0x00, 0x01 + }; + + var outer = new byte[1 + 1 + inner.Length]; + outer[0] = 0x70; // constructed + outer[1] = (byte)inner.Length; + Array.Copy(inner, 0, outer, 2, inner.Length); + + var tags = TlvParser.Parse(outer); + Assert.Single(tags); + + var nested = tags[0].GetNestedTags(); + Assert.Equal(2, nested.Count); + + // Rebuild outer + var rebuiltInner = new TlvBuilder(); + foreach (var n in nested) rebuiltInner.AddTag(n); + var innerBytes = rebuiltInner.Build(); + + var rebuiltOuter = new TlvBuilder(); + rebuiltOuter.AddTag("70", innerBytes); + + Assert.Equal(outer, rebuiltOuter.Build()); + } + + [Fact] + public void RoundTripLongFormLength() + { + var value = new byte[200]; + new Random(42).NextBytes(value); + + var built = new TlvBuilder() + .AddTag("9F10", value) + .Build(); + + var parsed = TlvParser.Parse(built); + Assert.Single(parsed); + Assert.Equal("9F10", parsed[0].Tag); + Assert.Equal(200, parsed[0].Length); + Assert.Equal(value, parsed[0].Value); + + // Re-encode + var reBuilt = new TlvBuilder(); + foreach (var tag in parsed) reBuilt.AddTag(tag); + Assert.Equal(built, reBuilt.Build()); + } + + [Fact] + public void RoundTripThreeByteTag() + { + var original = new byte[] { 0xDF, 0x81, 0x01, 0x02, 0xAA, 0xBB }; + + var tags = TlvParser.Parse(original); + Assert.Single(tags); + Assert.Equal("DF8101", tags[0].Tag); + + var rebuilt = new TlvBuilder(); + foreach (var tag in tags) rebuilt.AddTag(tag); + Assert.Equal(original, rebuilt.Build()); + } + + [Fact] + public void RoundTripFullEmvData() + { + var hex = "9F2608A1B2C3D4E5F60708" + + "9F270180" + + "9F100706010A03A4B000" + + "9F3704DEADBEEF" + + "9F36020042" + + "95050000080000" + + "9A03260401" + + "9C0100" + + "5F2A020840" + + "82021980" + + "9F1A020840" + + "9F0306000000000000" + + "9F3303E0F0C8" + + "9F3403020000" + + "9F350122" + + "9F0902008C" + + "8407A0000000041010"; + + var original = Convert.FromHexString(hex); + var tags = TlvParser.Parse(original); + Assert.Equal(17, tags.Count); + + var rebuilt = new TlvBuilder(); + foreach (var tag in tags) rebuilt.AddTag(tag); + Assert.Equal(original, rebuilt.Build()); + } + } +} diff --git a/NetCore8583.Test/Tracer/TestSimpleTraceGenerator.cs b/NetCore8583.Test/Tracer/TestSimpleTraceGenerator.cs index 3bcd743..98ba6ed 100644 --- a/NetCore8583.Test/Tracer/TestSimpleTraceGenerator.cs +++ b/NetCore8583.Test/Tracer/TestSimpleTraceGenerator.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Collections.Generic; using System.Threading; diff --git a/NetCore8583/Builder/CompositeFieldBuilder.cs b/NetCore8583/Builder/CompositeFieldBuilder.cs index 1194b53..b0dd84d 100644 --- a/NetCore8583/Builder/CompositeFieldBuilder.cs +++ b/NetCore8583/Builder/CompositeFieldBuilder.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Collections.Generic; using System.Text; diff --git a/NetCore8583/Builder/MessageFactoryBuilder.cs b/NetCore8583/Builder/MessageFactoryBuilder.cs index a5d08b3..2a7d50c 100644 --- a/NetCore8583/Builder/MessageFactoryBuilder.cs +++ b/NetCore8583/Builder/MessageFactoryBuilder.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Collections.Generic; using System.Text; diff --git a/NetCore8583/Builder/ParseMapBuilder.cs b/NetCore8583/Builder/ParseMapBuilder.cs index 56af3ed..f79ebb0 100644 --- a/NetCore8583/Builder/ParseMapBuilder.cs +++ b/NetCore8583/Builder/ParseMapBuilder.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Collections.Generic; using System.Text; diff --git a/NetCore8583/Builder/TemplateBuilder.cs b/NetCore8583/Builder/TemplateBuilder.cs index a75c94b..f077e0d 100644 --- a/NetCore8583/Builder/TemplateBuilder.cs +++ b/NetCore8583/Builder/TemplateBuilder.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Collections.Generic; using System.Text; diff --git a/NetCore8583/Codecs/BigIntBcdCodec.cs b/NetCore8583/Codecs/BigIntBcdCodec.cs index eb3fa7c..e3812b1 100644 --- a/NetCore8583/Codecs/BigIntBcdCodec.cs +++ b/NetCore8583/Codecs/BigIntBcdCodec.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Globalization; using System.Numerics; diff --git a/NetCore8583/Codecs/CompositeField.cs b/NetCore8583/Codecs/CompositeField.cs index 9f0e36f..d8c5790 100644 --- a/NetCore8583/Codecs/CompositeField.cs +++ b/NetCore8583/Codecs/CompositeField.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Collections.Generic; using System.IO; diff --git a/NetCore8583/Codecs/LongBcdCodec.cs b/NetCore8583/Codecs/LongBcdCodec.cs index 6cf61e6..a03c89b 100644 --- a/NetCore8583/Codecs/LongBcdCodec.cs +++ b/NetCore8583/Codecs/LongBcdCodec.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using NetCore8583.Extensions; diff --git a/NetCore8583/Extensions/Arrays.cs b/NetCore8583/Extensions/Arrays.cs index aa05abe..68dd666 100644 --- a/NetCore8583/Extensions/Arrays.cs +++ b/NetCore8583/Extensions/Arrays.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; namespace NetCore8583.Extensions diff --git a/NetCore8583/Extensions/Bcd.cs b/NetCore8583/Extensions/Bcd.cs index 7e6c93b..fc7ab0f 100644 --- a/NetCore8583/Extensions/Bcd.cs +++ b/NetCore8583/Extensions/Bcd.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Numerics; diff --git a/NetCore8583/Extensions/Bitmap128.cs b/NetCore8583/Extensions/Bitmap128.cs index 100b334..84ad593 100644 --- a/NetCore8583/Extensions/Bitmap128.cs +++ b/NetCore8583/Extensions/Bitmap128.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Runtime.CompilerServices; diff --git a/NetCore8583/Extensions/Bytes.cs b/NetCore8583/Extensions/Bytes.cs index 41a75ce..68b86d5 100644 --- a/NetCore8583/Extensions/Bytes.cs +++ b/NetCore8583/Extensions/Bytes.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/NetCore8583/Extensions/Dates.cs b/NetCore8583/Extensions/Dates.cs index 4bfd04d..fe003e7 100644 --- a/NetCore8583/Extensions/Dates.cs +++ b/NetCore8583/Extensions/Dates.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; namespace NetCore8583.Extensions diff --git a/NetCore8583/Extensions/DictionaryExtensions.cs b/NetCore8583/Extensions/DictionaryExtensions.cs index 7e93568..8b292ed 100644 --- a/NetCore8583/Extensions/DictionaryExtensions.cs +++ b/NetCore8583/Extensions/DictionaryExtensions.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System.Collections.Generic; namespace NetCore8583.Extensions diff --git a/NetCore8583/Extensions/EncodingCache.cs b/NetCore8583/Extensions/EncodingCache.cs index 37bd0e3..7a5f2d5 100644 --- a/NetCore8583/Extensions/EncodingCache.cs +++ b/NetCore8583/Extensions/EncodingCache.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System.Text; namespace NetCore8583.Extensions diff --git a/NetCore8583/Extensions/Enumm.cs b/NetCore8583/Extensions/Enumm.cs index 98ebedc..65314e7 100644 --- a/NetCore8583/Extensions/Enumm.cs +++ b/NetCore8583/Extensions/Enumm.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; namespace NetCore8583.Extensions diff --git a/NetCore8583/Extensions/HexCodec.cs b/NetCore8583/Extensions/HexCodec.cs index 87a5c1e..d180e71 100644 --- a/NetCore8583/Extensions/HexCodec.cs +++ b/NetCore8583/Extensions/HexCodec.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; namespace NetCore8583.Extensions diff --git a/NetCore8583/Extensions/OsUtil.cs b/NetCore8583/Extensions/OsUtil.cs index 6b5abe9..3b48b67 100644 --- a/NetCore8583/Extensions/OsUtil.cs +++ b/NetCore8583/Extensions/OsUtil.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; namespace NetCore8583.Extensions diff --git a/NetCore8583/Extensions/ParseException.cs b/NetCore8583/Extensions/ParseException.cs index 65fadc4..90f1f2e 100644 --- a/NetCore8583/Extensions/ParseException.cs +++ b/NetCore8583/Extensions/ParseException.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; namespace NetCore8583.Extensions diff --git a/NetCore8583/Extensions/Stringx.cs b/NetCore8583/Extensions/Stringx.cs index 2f60798..c5c03a1 100644 --- a/NetCore8583/Extensions/Stringx.cs +++ b/NetCore8583/Extensions/Stringx.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Buffers; using System.Runtime.CompilerServices; diff --git a/NetCore8583/ICustomBinaryField.cs b/NetCore8583/ICustomBinaryField.cs index d94d1b3..9dc60d7 100644 --- a/NetCore8583/ICustomBinaryField.cs +++ b/NetCore8583/ICustomBinaryField.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + namespace NetCore8583 { /// Extends for fields that are transmitted as raw binary (e.g. LLBIN, LLLBIN) with encode/decode of byte buffers. diff --git a/NetCore8583/ICustomField.cs b/NetCore8583/ICustomField.cs index 04d63db..8a33a72 100644 --- a/NetCore8583/ICustomField.cs +++ b/NetCore8583/ICustomField.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + namespace NetCore8583 { /// Interface for custom encoding/decoding of ISO 8583 field values (e.g. special formats, encryption). diff --git a/NetCore8583/ILogger.cs b/NetCore8583/ILogger.cs index 46aaa91..b1ce214 100644 --- a/NetCore8583/ILogger.cs +++ b/NetCore8583/ILogger.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Diagnostics; diff --git a/NetCore8583/ITraceNumberGenerator.cs b/NetCore8583/ITraceNumberGenerator.cs index 5fd5de3..eaf565e 100644 --- a/NetCore8583/ITraceNumberGenerator.cs +++ b/NetCore8583/ITraceNumberGenerator.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + namespace NetCore8583 { /// diff --git a/NetCore8583/IsoMessage.cs b/NetCore8583/IsoMessage.cs index 7a22797..08cc5e1 100644 --- a/NetCore8583/IsoMessage.cs +++ b/NetCore8583/IsoMessage.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Collections; using System.Collections.Generic; diff --git a/NetCore8583/IsoType.cs b/NetCore8583/IsoType.cs index 554bd31..ac3f643 100644 --- a/NetCore8583/IsoType.cs +++ b/NetCore8583/IsoType.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Globalization; diff --git a/NetCore8583/IsoValue.cs b/NetCore8583/IsoValue.cs index 17a06c3..563ad6b 100644 --- a/NetCore8583/IsoValue.cs +++ b/NetCore8583/IsoValue.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Collections.Generic; using System.IO; diff --git a/NetCore8583/MessageFactory.cs b/NetCore8583/MessageFactory.cs index dfaf97d..a5d3375 100644 --- a/NetCore8583/MessageFactory.cs +++ b/NetCore8583/MessageFactory.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Collections; using System.Collections.Generic; diff --git a/NetCore8583/NetCore8583.csproj b/NetCore8583/NetCore8583.csproj index b0b645e..963fcc6 100644 --- a/NetCore8583/NetCore8583.csproj +++ b/NetCore8583/NetCore8583.csproj @@ -11,11 +11,22 @@ README.md Iso8583 NetCore Banking C# Arsene Tochemey Gandote 2018-2026 - 2.4.0 + 2.5.0 net10.0;net8.0;net9.0 - 2.4.0 + 2.5.0 NetCore8583 + v2.5.0 + + New Features: + - EMV TLV support: new NetCore8583.Tlv namespace with full BER-TLV parsing, building, and ISO 8583 field integration. + - TlvParser: parses BER-TLV encoded byte data into TlvTag records, handling single-byte tags, multi-byte tags (2–3+ bytes), and multi-byte lengths (definite form). + - TlvBuilder: fluent API for constructing BER-TLV encoded byte sequences with .AddTag(tag, value).Build(). + - TlvTag: immutable record type with Tag (hex string), Length, Value (byte[]), Description, nested tag support for constructed data objects. + - EmvTags: built-in frozen dictionary of common EMV tag descriptions (9F26, 9F27, 9F10, 9F37, 9F36, 95, 9A, 9C, 5F2A, 82, 9F1A, 9F03, 9F33, 9F34, 9F35, 9F09, 84, and more). + - TlvField: ICustomBinaryField implementation for registering field 55 (or any TLV field) as a TLV-aware composite field. + - IsoMessage TLV extensions: GetTlvTags(), SetTlvTags(), GetTlvBytes(), FindTlvTag() helpers for convenient field 55 access. + v2.4.0 New Features: diff --git a/NetCore8583/Parse/AlphaNumericFieldParseInfo.cs b/NetCore8583/Parse/AlphaNumericFieldParseInfo.cs index a341930..26b0896 100644 --- a/NetCore8583/Parse/AlphaNumericFieldParseInfo.cs +++ b/NetCore8583/Parse/AlphaNumericFieldParseInfo.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using NetCore8583.Extensions; diff --git a/NetCore8583/Parse/AlphaParseInfo.cs b/NetCore8583/Parse/AlphaParseInfo.cs index f38a007..3978423 100644 --- a/NetCore8583/Parse/AlphaParseInfo.cs +++ b/NetCore8583/Parse/AlphaParseInfo.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using NetCore8583.Extensions; diff --git a/NetCore8583/Parse/AmountParseInfo.cs b/NetCore8583/Parse/AmountParseInfo.cs index 3b70de6..a899fa7 100644 --- a/NetCore8583/Parse/AmountParseInfo.cs +++ b/NetCore8583/Parse/AmountParseInfo.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using NetCore8583.Extensions; diff --git a/NetCore8583/Parse/BinaryParseInfo.cs b/NetCore8583/Parse/BinaryParseInfo.cs index 1f28df4..c5b1119 100644 --- a/NetCore8583/Parse/BinaryParseInfo.cs +++ b/NetCore8583/Parse/BinaryParseInfo.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Text; using NetCore8583.Extensions; diff --git a/NetCore8583/Parse/ConfigParser.cs b/NetCore8583/Parse/ConfigParser.cs index 159d7f9..4eb9184 100644 --- a/NetCore8583/Parse/ConfigParser.cs +++ b/NetCore8583/Parse/ConfigParser.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Collections.Generic; using System.Diagnostics; diff --git a/NetCore8583/Parse/Date10ParseInfo.cs b/NetCore8583/Parse/Date10ParseInfo.cs index 1f98b13..570e53d 100644 --- a/NetCore8583/Parse/Date10ParseInfo.cs +++ b/NetCore8583/Parse/Date10ParseInfo.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using NetCore8583.Extensions; diff --git a/NetCore8583/Parse/Date12ParseInfo.cs b/NetCore8583/Parse/Date12ParseInfo.cs index 08e79b5..a99b843 100644 --- a/NetCore8583/Parse/Date12ParseInfo.cs +++ b/NetCore8583/Parse/Date12ParseInfo.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using NetCore8583.Extensions; diff --git a/NetCore8583/Parse/Date14ParseInfo.cs b/NetCore8583/Parse/Date14ParseInfo.cs index 5b33c07..09c01ea 100644 --- a/NetCore8583/Parse/Date14ParseInfo.cs +++ b/NetCore8583/Parse/Date14ParseInfo.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using NetCore8583.Extensions; diff --git a/NetCore8583/Parse/Date4ParseInfo.cs b/NetCore8583/Parse/Date4ParseInfo.cs index 25559f4..fc8ce3b 100644 --- a/NetCore8583/Parse/Date4ParseInfo.cs +++ b/NetCore8583/Parse/Date4ParseInfo.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using NetCore8583.Extensions; diff --git a/NetCore8583/Parse/Date6ParseInfo.cs b/NetCore8583/Parse/Date6ParseInfo.cs index 0ee5fbf..ff69b12 100644 --- a/NetCore8583/Parse/Date6ParseInfo.cs +++ b/NetCore8583/Parse/Date6ParseInfo.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using NetCore8583.Extensions; diff --git a/NetCore8583/Parse/DateExpParseInfo.cs b/NetCore8583/Parse/DateExpParseInfo.cs index ff12e4c..a227b17 100644 --- a/NetCore8583/Parse/DateExpParseInfo.cs +++ b/NetCore8583/Parse/DateExpParseInfo.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using NetCore8583.Extensions; diff --git a/NetCore8583/Parse/DateTimeParseInfo.cs b/NetCore8583/Parse/DateTimeParseInfo.cs index ed1ad45..a41d3c2 100644 --- a/NetCore8583/Parse/DateTimeParseInfo.cs +++ b/NetCore8583/Parse/DateTimeParseInfo.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; namespace NetCore8583.Parse diff --git a/NetCore8583/Parse/FieldParseInfo.cs b/NetCore8583/Parse/FieldParseInfo.cs index 1f848a1..9338cb8 100644 --- a/NetCore8583/Parse/FieldParseInfo.cs +++ b/NetCore8583/Parse/FieldParseInfo.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Runtime.CompilerServices; using System.Text; diff --git a/NetCore8583/Parse/LlbinParseInfo.cs b/NetCore8583/Parse/LlbinParseInfo.cs index 62086eb..dbcd0d0 100644 --- a/NetCore8583/Parse/LlbinParseInfo.cs +++ b/NetCore8583/Parse/LlbinParseInfo.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Text; using NetCore8583.Extensions; diff --git a/NetCore8583/Parse/LllbinParseInfo.cs b/NetCore8583/Parse/LllbinParseInfo.cs index 732ddf8..053ef77 100644 --- a/NetCore8583/Parse/LllbinParseInfo.cs +++ b/NetCore8583/Parse/LllbinParseInfo.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Text; using NetCore8583.Extensions; diff --git a/NetCore8583/Parse/LlllbinParseInfo.cs b/NetCore8583/Parse/LlllbinParseInfo.cs index 847ac72..69c75c7 100644 --- a/NetCore8583/Parse/LlllbinParseInfo.cs +++ b/NetCore8583/Parse/LlllbinParseInfo.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Text; using NetCore8583.Extensions; diff --git a/NetCore8583/Parse/LlllvarParseInfo.cs b/NetCore8583/Parse/LlllvarParseInfo.cs index 033437c..c960cd3 100644 --- a/NetCore8583/Parse/LlllvarParseInfo.cs +++ b/NetCore8583/Parse/LlllvarParseInfo.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Runtime.CompilerServices; using NetCore8583.Extensions; diff --git a/NetCore8583/Parse/LllvarParseInfo.cs b/NetCore8583/Parse/LllvarParseInfo.cs index d171cdb..7a85097 100644 --- a/NetCore8583/Parse/LllvarParseInfo.cs +++ b/NetCore8583/Parse/LllvarParseInfo.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Runtime.CompilerServices; using System.Text; diff --git a/NetCore8583/Parse/LlvarParseInfo.cs b/NetCore8583/Parse/LlvarParseInfo.cs index e14373a..db0fead 100644 --- a/NetCore8583/Parse/LlvarParseInfo.cs +++ b/NetCore8583/Parse/LlvarParseInfo.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Runtime.CompilerServices; using NetCore8583.Extensions; diff --git a/NetCore8583/Parse/NumericParseInfo.cs b/NetCore8583/Parse/NumericParseInfo.cs index bb5dc36..e1ced1a 100644 --- a/NetCore8583/Parse/NumericParseInfo.cs +++ b/NetCore8583/Parse/NumericParseInfo.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using NetCore8583.Extensions; diff --git a/NetCore8583/Parse/TimeParseInfo.cs b/NetCore8583/Parse/TimeParseInfo.cs index 3bc2593..ef9cc4b 100644 --- a/NetCore8583/Parse/TimeParseInfo.cs +++ b/NetCore8583/Parse/TimeParseInfo.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using NetCore8583.Extensions; diff --git a/NetCore8583/Tlv/EmvTags.cs b/NetCore8583/Tlv/EmvTags.cs new file mode 100644 index 0000000..9b952d6 --- /dev/null +++ b/NetCore8583/Tlv/EmvTags.cs @@ -0,0 +1,102 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +using System; +using System.Collections.Frozen; +using System.Collections.Generic; + +namespace NetCore8583.Tlv +{ + /// + /// Built-in dictionary of common EMV tags with human-readable descriptions. + /// Tag identifiers are stored as uppercase hex strings. + /// + /// Descriptions are sourced from the EMV v4.3 Specification + /// (EMV Book 3 -- Application Specification, and EMV Book 1 -- Application Independent ICC to Terminal + /// Interface Requirements), published by EMVCo. + /// ISO 7816-4 tags (e.g. 70, 77, 84) follow their definitions in ISO/IEC 7816-4:2020. + /// + /// + public static class EmvTags + { + /// The EMV specification version these tag descriptions are sourced from. + public const string SpecVersion = "EMV v4.3"; + + /// Frozen lookup of tag hex string to description, covering the most commonly used EMV tags per . + public static readonly FrozenDictionary Descriptions = + new Dictionary(StringComparer.OrdinalIgnoreCase) + { + // Core DE 55 tags (EMV Book 3, Annex A) + ["5F2A"] = "Transaction Currency Code", + ["82"] = "Application Interchange Profile", + ["84"] = "Dedicated File (DF) Name", + ["95"] = "Terminal Verification Results", + ["9A"] = "Transaction Date", + ["9C"] = "Transaction Type", + ["9F03"] = "Amount, Other (Numeric)", + ["9F09"] = "Application Version Number (Terminal)", + ["9F10"] = "Issuer Application Data", + ["9F1A"] = "Terminal Country Code", + ["9F26"] = "Application Cryptogram", + ["9F27"] = "Cryptogram Information Data", + ["9F33"] = "Terminal Capabilities", + ["9F34"] = "Cardholder Verification Method (CVM) Results", + ["9F35"] = "Terminal Type", + ["9F36"] = "Application Transaction Counter (ATC)", + ["9F37"] = "Unpredictable Number", + + // Card data (EMV Book 3) + ["50"] = "Application Label", + ["57"] = "Track 2 Equivalent Data", + ["5A"] = "Application Primary Account Number (PAN)", + ["5F24"] = "Application Expiration Date", + ["5F25"] = "Application Effective Date", + ["5F28"] = "Issuer Country Code", + ["5F34"] = "Application PAN Sequence Number", + + // Transaction / terminal (EMV Book 3) + ["9F02"] = "Amount, Authorised (Numeric)", + ["9F06"] = "Application Identifier (AID) - Terminal", + ["9F07"] = "Application Usage Control", + ["9F08"] = "Application Version Number (Card)", + ["9F0D"] = "Issuer Action Code - Default", + ["9F0E"] = "Issuer Action Code - Denial", + ["9F0F"] = "Issuer Action Code - Online", + ["9F17"] = "PIN Try Counter", + ["9F1E"] = "Interface Device (IFD) Serial Number", + ["9F21"] = "Transaction Time", + ["9F41"] = "Transaction Sequence Counter", + + // Templates and structural (ISO 7816-4 / EMV Book 1) + ["70"] = "EMV Proprietary Template", + ["77"] = "Response Message Template Format 2", + ["80"] = "Response Message Template Format 1", + ["94"] = "Application File Locator (AFL)", + }.ToFrozenDictionary(StringComparer.OrdinalIgnoreCase); + + /// Looks up a human-readable description for the given tag hex string. + /// Tag hex string (e.g. "9F26"). + /// The description if found; otherwise null. + public static string GetDescription(string tag) => + Descriptions.TryGetValue(tag, out var desc) ? desc : null; + } +} diff --git a/NetCore8583/Tlv/IsoMessageTlvExtensions.cs b/NetCore8583/Tlv/IsoMessageTlvExtensions.cs new file mode 100644 index 0000000..93238df --- /dev/null +++ b/NetCore8583/Tlv/IsoMessageTlvExtensions.cs @@ -0,0 +1,145 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using NetCore8583.Extensions; + +namespace NetCore8583.Tlv +{ + /// + /// Extension methods on for convenient access to field 55 (or any TLV-bearing field) as parsed objects. + /// + public static class IsoMessageTlvExtensions + { + private const int DefaultTlvField = 55; + + /// + /// Retrieves field 55 as a parsed list of objects. + /// Works both when a encoder is registered (object is already parsed) + /// and when the raw value is a byte array or hex string (parses on-the-fly). + /// + /// The ISO message. + /// The field number containing TLV data (default 55). + /// The parsed TLV tags, or null if the field is not present. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static IReadOnlyList GetTlvTags(this IsoMessage message, int fieldNumber = DefaultTlvField) + { + var isoValue = message.GetField(fieldNumber); + if (isoValue == null) + return null; + + var obj = isoValue.Value; + + if (obj is IReadOnlyList tags) + return tags; + + if (obj is byte[] bytes) + return TlvParser.Parse(bytes); + + if (obj is sbyte[] signed) + return TlvParser.Parse(signed.ToUint8()); + + if (obj is string hex && !string.IsNullOrEmpty(hex)) + return TlvParser.Parse(Convert.FromHexString(hex)); + + return null; + } + + /// + /// Sets field 55 with the given TLV tags, encoding them as BER-TLV. + /// Requires a encoder to be registered on the for the target field. + /// + /// The ISO message. + /// The TLV tags to set. + /// The custom encoder. If null, a default instance is used. + /// The ISO type for the field (default LLLBIN for field 55). + /// The field number (default 55). + /// The message for chaining. + public static IsoMessage SetTlvTags( + this IsoMessage message, + IReadOnlyList tags, + TlvField encoder = null, + IsoType isoType = IsoType.LLLBIN, + int fieldNumber = DefaultTlvField) + { + encoder ??= new TlvField(); + + var builder = new TlvBuilder(); + foreach (var tag in tags) + builder.AddTag(tag); + + var data = builder.Build(); + message.SetValue(fieldNumber, tags, encoder, isoType, data.Length); + return message; + } + + /// + /// Retrieves the raw TLV-encoded bytes from field 55 (or another TLV field). + /// + /// The ISO message. + /// The field number (default 55). + /// The raw TLV bytes, or null if the field is not present. + public static byte[] GetTlvBytes(this IsoMessage message, int fieldNumber = DefaultTlvField) + { + var isoValue = message.GetField(fieldNumber); + if (isoValue == null) + return null; + + var obj = isoValue.Value; + + if (obj is byte[] bytes) + return bytes; + + if (obj is sbyte[] signed) + return signed.ToUint8(); + + if (obj is IReadOnlyList tags) + { + var builder = new TlvBuilder(); + foreach (var tag in tags) + builder.AddTag(tag); + return builder.Build(); + } + + if (obj is string hex && !string.IsNullOrEmpty(hex)) + return Convert.FromHexString(hex); + + return null; + } + + /// + /// Finds a specific TLV tag by its hex tag identifier within field 55. + /// + /// The ISO message. + /// The tag hex string to find (e.g. "9F26"). + /// The field number (default 55). + /// The matching , or null if not found. + public static TlvTag FindTlvTag(this IsoMessage message, string tag, int fieldNumber = DefaultTlvField) + { + var tags = message.GetTlvTags(fieldNumber); + return tags?.FirstOrDefault(t => string.Equals(t.Tag, tag, StringComparison.OrdinalIgnoreCase)); + } + } +} diff --git a/NetCore8583/Tlv/TlvBuilder.cs b/NetCore8583/Tlv/TlvBuilder.cs new file mode 100644 index 0000000..4bd67e1 --- /dev/null +++ b/NetCore8583/Tlv/TlvBuilder.cs @@ -0,0 +1,144 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +using System; +using System.Collections.Generic; +using System.IO; + +namespace NetCore8583.Tlv +{ + /// + /// Fluent builder for constructing BER-TLV encoded byte sequences. + /// Supports single-byte and multi-byte tags, and encodes lengths using the minimal BER-TLV form. + /// + public sealed class TlvBuilder + { + private readonly List<(byte[] TagBytes, byte[] Value)> _entries = new(); + + /// + /// Adds a TLV data object with the given tag and value. + /// + /// The tag as a hex string (e.g. "9F26", "82"). Must be a valid BER-TLV tag. + /// The raw value bytes for this tag. + /// This builder for chaining. + /// Thrown when is null, empty, or not valid hex. + /// Thrown when is null. + public TlvBuilder AddTag(string tag, byte[] value) + { + if (string.IsNullOrWhiteSpace(tag)) + throw new ArgumentException("Tag must not be null or empty.", nameof(tag)); + ArgumentNullException.ThrowIfNull(value); + + var tagBytes = Convert.FromHexString(tag); + if (tagBytes.Length == 0) + throw new ArgumentException("Tag must decode to at least one byte.", nameof(tag)); + + _entries.Add((tagBytes, value)); + return this; + } + + /// + /// Adds a TLV data object with the tag and value specified as raw bytes. + /// The caller must not mutate the arrays after passing them to the builder. + /// + /// The raw tag bytes. + /// The raw value bytes. + /// This builder for chaining. + public TlvBuilder AddTag(byte[] tagBytes, byte[] value) + { + ArgumentNullException.ThrowIfNull(tagBytes); + ArgumentNullException.ThrowIfNull(value); + if (tagBytes.Length == 0) + throw new ArgumentException("Tag must have at least one byte.", nameof(tagBytes)); + + _entries.Add((tagBytes, value)); + return this; + } + + /// + /// Adds a pre-parsed to the builder. + /// + /// The TLV tag to add. + /// This builder for chaining. + public TlvBuilder AddTag(TlvTag tlvTag) + { + ArgumentNullException.ThrowIfNull(tlvTag); + return AddTag(tlvTag.Tag, tlvTag.Value); + } + + /// + /// Builds the BER-TLV encoded byte sequence from all added tags. + /// + /// The concatenated TLV-encoded byte array. + public byte[] Build() + { + using var stream = new MemoryStream(); + + foreach (var (tagBytes, value) in _entries) + { + stream.Write(tagBytes, 0, tagBytes.Length); + WriteLength(stream, value.Length); + stream.Write(value, 0, value.Length); + } + + return stream.ToArray(); + } + + /// + /// Encodes a length value using BER-TLV definite-form encoding and writes it to the stream. + /// Uses the minimal encoding: short form for lengths 0–127, long form for 128+. + /// + internal static void WriteLength(Stream stream, int length) + { + switch (length) + { + case < 0: + throw new ArgumentOutOfRangeException(nameof(length), "Length must be non-negative."); + case <= 0x7F: + stream.WriteByte((byte)length); + break; + case <= 0xFF: + stream.WriteByte(0x81); + stream.WriteByte((byte)length); + break; + case <= 0xFFFF: + stream.WriteByte(0x82); + stream.WriteByte((byte)(length >> 8)); + stream.WriteByte((byte)(length & 0xFF)); + break; + case <= 0xFFFFFF: + stream.WriteByte(0x83); + stream.WriteByte((byte)(length >> 16)); + stream.WriteByte((byte)((length >> 8) & 0xFF)); + stream.WriteByte((byte)(length & 0xFF)); + break; + default: + stream.WriteByte(0x84); + stream.WriteByte((byte)(length >> 24)); + stream.WriteByte((byte)((length >> 16) & 0xFF)); + stream.WriteByte((byte)((length >> 8) & 0xFF)); + stream.WriteByte((byte)(length & 0xFF)); + break; + } + } + } +} diff --git a/NetCore8583/Tlv/TlvField.cs b/NetCore8583/Tlv/TlvField.cs new file mode 100644 index 0000000..b6d31cb --- /dev/null +++ b/NetCore8583/Tlv/TlvField.cs @@ -0,0 +1,101 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using NetCore8583.Extensions; + +namespace NetCore8583.Tlv +{ + /// + /// An implementation that encodes/decodes field values as BER-TLV data. + /// Register an instance with for field 55 (or any other TLV-bearing field) + /// so that the field's object value is an instead of raw bytes. + /// + public sealed class TlvField : ICustomBinaryField + { + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public object DecodeField(string value) + { + if (string.IsNullOrEmpty(value)) + return Array.Empty(); + + var bytes = Convert.FromHexString(value); + return TlvParser.Parse(bytes); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public string EncodeField(object value) + { + var tags = CastToTags(value); + if (tags == null || tags.Count == 0) + return string.Empty; + + var builder = new TlvBuilder(); + foreach (var tag in tags) + builder.AddTag(tag); + + return Convert.ToHexString(builder.Build()); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public object DecodeBinaryField(sbyte[] bytes, int offset, int length) + { + if (length <= 0) + return Array.Empty(); + + ReadOnlySpan unsigned = MemoryMarshal.Cast(bytes.AsSpan(offset, length)); + return TlvParser.Parse(unsigned); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public sbyte[] EncodeBinaryField(object value) + { + var tags = CastToTags(value); + if (tags == null || tags.Count == 0) + return Array.Empty(); + + var builder = new TlvBuilder(); + foreach (var tag in tags) + builder.AddTag(tag); + + return builder.Build().ToInt8(); + } + + private static IReadOnlyList CastToTags(object value) + { + return value switch + { + IReadOnlyList list => list, + IEnumerable enumerable => enumerable.ToList(), + _ => null + }; + } + } +} diff --git a/NetCore8583/Tlv/TlvParser.cs b/NetCore8583/Tlv/TlvParser.cs new file mode 100644 index 0000000..cbcd1c4 --- /dev/null +++ b/NetCore8583/Tlv/TlvParser.cs @@ -0,0 +1,164 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +using System; +using System.Collections.Generic; + +namespace NetCore8583.Tlv +{ + /// + /// Parses raw byte data encoded in BER-TLV format (as used by EMV / ISO 7816-4) into a list of objects. + /// Handles single-byte and multi-byte tags as well as single-byte and multi-byte (definite) lengths. + /// + public static class TlvParser + { + /// + /// Parses a BER-TLV encoded byte array into an ordered list of data objects. + /// + /// The raw TLV-encoded bytes. + /// An ordered, read-only list of parsed TLV tags. + /// Thrown when is null. + /// Thrown when the data contains malformed TLV structures. + public static IReadOnlyList Parse(byte[] data) + { + ArgumentNullException.ThrowIfNull(data); + return Parse(data.AsSpan()); + } + + /// + /// Parses a BER-TLV encoded byte span into an ordered list of data objects. + /// + /// The raw TLV-encoded bytes. + /// An ordered, read-only list of parsed TLV tags. + /// Thrown when the data contains malformed TLV structures. + public static IReadOnlyList Parse(ReadOnlySpan data) + { + var tags = new List(); + var offset = 0; + + while (offset < data.Length) + { + // Skip padding bytes (0x00 and 0xFF are inter-TLV padding per EMV Book 3) + if (data[offset] == 0x00 || data[offset] == 0xFF) + { + offset++; + continue; + } + + var (tag, tagLength) = ReadTag(data, offset); + offset += tagLength; + + if (offset >= data.Length) + throw new FormatException($"TLV data truncated after tag {tag} at offset {offset - tagLength}."); + + var (valueLength, lengthFieldSize) = ReadLength(data, offset); + offset += lengthFieldSize; + + if (offset + valueLength > data.Length) + throw new FormatException( + $"TLV value for tag {tag} at offset {offset} declares length {valueLength} but only {data.Length - offset} bytes remain."); + + var value = data.Slice(offset, valueLength).ToArray(); + offset += valueLength; + + var description = EmvTags.GetDescription(tag); + tags.Add(new TlvTag(tag, valueLength, value, description)); + } + + return tags; + } + + /// + /// Reads a BER-TLV tag at the given offset. + /// Per ISO 8825-1 / EMV v4.3 Book 3: + /// - If bits 5–1 of the first byte are all 1 (lower 5 bits == 0x1F), the tag is multi-byte. + /// - Subsequent bytes are part of the tag while bit 8 is set; the last tag byte has bit 8 cleared. + /// + /// A tuple of (tag hex string, number of bytes consumed). + internal static (string Tag, int BytesConsumed) ReadTag(ReadOnlySpan data, int offset) + { + if (offset >= data.Length) + throw new FormatException("Unexpected end of data while reading TLV tag."); + + var start = offset; + var firstByte = data[offset++]; + + if ((firstByte & 0x1F) == 0x1F) + { + // Multi-byte tag + while (offset < data.Length) + { + var b = data[offset++]; + if ((b & 0x80) == 0) + break; // last byte of multi-byte tag + + if (offset >= data.Length) + throw new FormatException("Unexpected end of data in multi-byte TLV tag."); + } + } + + var tagLength = offset - start; + var tagHex = Convert.ToHexString(data.Slice(start, tagLength)); + return (tagHex, tagLength); + } + + /// + /// Reads a BER-TLV length at the given offset. + /// Per ISO 8825-1: + /// - If the first byte is 0x00–0x7F, it is the length (short form). + /// - If bit 8 is set, bits 7–1 indicate how many subsequent bytes encode the length (long form, definite). + /// - Indefinite form (0x80) is not used in EMV and is rejected. + /// + /// A tuple of (decoded length, number of bytes consumed by the length field). + internal static (int Length, int BytesConsumed) ReadLength(ReadOnlySpan data, int offset) + { + if (offset >= data.Length) + throw new FormatException("Unexpected end of data while reading TLV length."); + + var firstByte = data[offset++]; + + // Short form: single byte, 0x00–0x7F + if ((firstByte & 0x80) == 0) + return (firstByte, 1); + + // Long form: first byte encodes the number of subsequent length bytes + var numLenBytes = firstByte & 0x7F; + + if (numLenBytes == 0) + throw new FormatException("Indefinite-length encoding is not supported in EMV BER-TLV."); + + if (numLenBytes > 4) + throw new FormatException($"TLV length field is too large ({numLenBytes} bytes); maximum supported is 4."); + + if (offset + numLenBytes > data.Length) + throw new FormatException("Unexpected end of data while reading multi-byte TLV length."); + + var length = 0; + for (var i = 0; i < numLenBytes; i++) + { + length = (length << 8) | data[offset++]; + } + + return (length, 1 + numLenBytes); + } + } +} diff --git a/NetCore8583/Tlv/TlvTag.cs b/NetCore8583/Tlv/TlvTag.cs new file mode 100644 index 0000000..3cf7197 --- /dev/null +++ b/NetCore8583/Tlv/TlvTag.cs @@ -0,0 +1,108 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +using System; +using System.Collections.Generic; + +namespace NetCore8583.Tlv +{ + /// + /// Represents a single BER-TLV data object with tag identifier, length, value, and optional human-readable description. + /// + /// The tag identifier as an uppercase hex string (e.g. "9F26", "82"). + /// The length of the value in bytes. + /// The raw value bytes. + /// An optional human-readable description of the tag (e.g. "Application Cryptogram"). + public sealed record TlvTag(string Tag, int Length, byte[] Value, string Description = null) + { + private byte[] _tagBytes; + + /// Returns the tag bytes decoded from the hex string. The result is cached after the first call. + public byte[] TagBytes => _tagBytes ??= Convert.FromHexString(Tag); + + /// True when the tag represents a constructed data object (bit 6 of the first tag byte is set per ISO 8825-1). + public bool IsConstructed + { + get + { + if (Tag.Length < 2) return false; + var firstNibble = HexCharToInt(Tag[0]); + return (firstNibble & 0x02) != 0; + } + } + + /// Parses the value of a constructed tag as a sequence of nested TLV objects. + /// The nested TLV tags, or an empty list if the value contains no valid TLV data. + /// Thrown when this tag is not constructed. + public IReadOnlyList GetNestedTags() + { + if (!IsConstructed) + throw new InvalidOperationException($"Tag {Tag} is not a constructed tag."); + return TlvParser.Parse(Value); + } + + /// + public bool Equals(TlvTag other) + { + if (other is null) return false; + if (ReferenceEquals(this, other)) return true; + return string.Equals(Tag, other.Tag, StringComparison.OrdinalIgnoreCase) + && Length == other.Length + && ValueEquals(Value, other.Value); + } + + /// + public override int GetHashCode() + { + var hash = new HashCode(); + hash.Add(Tag, StringComparer.OrdinalIgnoreCase); + hash.Add(Length); + if (Value != null) + hash.AddBytes(Value); + return hash.ToHashCode(); + } + + /// + public override string ToString() + { + var hex = Value != null ? Convert.ToHexString(Value) : ""; + var desc = Description != null ? $" ({Description})" : ""; + return $"[{Tag}] len={Length} val={hex}{desc}"; + } + + private static bool ValueEquals(byte[] a, byte[] b) + { + if (ReferenceEquals(a, b)) return true; + if (a is null || b is null) return false; + return a.AsSpan().SequenceEqual(b); + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + private static int HexCharToInt(char c) => c switch + { + >= '0' and <= '9' => c - '0', + >= 'A' and <= 'F' => c - 'A' + 10, + >= 'a' and <= 'f' => c - 'a' + 10, + _ => 0 + }; + } +} diff --git a/NetCore8583/Tracer/SimpleTraceGenerator.cs b/NetCore8583/Tracer/SimpleTraceGenerator.cs index 2b8bd43..ed0e145 100644 --- a/NetCore8583/Tracer/SimpleTraceGenerator.cs +++ b/NetCore8583/Tracer/SimpleTraceGenerator.cs @@ -1,3 +1,25 @@ +// MIT License +// +// Copyright (c) 2020 - 2026 Arsene Tochemey Gandote +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; namespace NetCore8583.Tracer diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000..85ab642 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,8 @@ +coverage: + status: + project: + default: + target: 80% + patch: + default: + enabled: false diff --git a/readme.md b/readme.md index 5d56665..f93f4d4 100644 --- a/readme.md +++ b/readme.md @@ -227,6 +227,231 @@ You can also create a [`CompositeField`](./NetCore8583/Codecs/CompositeField.cs) When the message is encoded, field 125 will be "018one 03two000123OK". +### 💳 EMV TLV Support (Field 55) + +NetCore8583 includes built-in support for EMV chip card data encoded in [BER-TLV](https://en.wikipedia.org/wiki/X.690#BER_encoding) format as defined by the [EMV v4.3 Specification](https://www.emvco.com/specifications/) (specifically [Book 3 -- Application Specification](https://www.emvco.com/specifications/) and [Book 1 -- ICC to Terminal Interface Requirements](https://www.emvco.com/specifications/)), with BER-TLV encoding rules per [ISO/IEC 8825-1](https://www.iso.org/standard/73409.html). This data is typically carried in ISO 8583 field 55 (ICC System Related Data). + +The TLV module lives in the `NetCore8583.Tlv` namespace and provides: + +- **[`TlvParser`](./NetCore8583/Tlv/TlvParser.cs)** -- parses raw BER-TLV bytes into structured [`TlvTag`](./NetCore8583/Tlv/TlvTag.cs) records +- **[`TlvBuilder`](./NetCore8583/Tlv/TlvBuilder.cs)** -- fluent API for constructing BER-TLV byte sequences +- **[`TlvField`](./NetCore8583/Tlv/TlvField.cs)** -- [`ICustomBinaryField`](./NetCore8583/ICustomBinaryField.cs) implementation for automatic TLV encode/decode in the message factory +- **[`EmvTags`](./NetCore8583/Tlv/EmvTags.cs)** -- built-in dictionary of common EMV tag descriptions +- **[`IsoMessageTlvExtensions`](./NetCore8583/Tlv/IsoMessageTlvExtensions.cs)** -- convenience extension methods on [`IsoMessage`](./NetCore8583/IsoMessage.cs) for field 55 access + +#### 📐 BER-TLV Encoding Rules + +The parser and builder fully implement: + +- **Single-byte tags** (e.g. `82`, `95`, `9A`, `9C`) +- **Multi-byte tags** (e.g. `9F26`, `5F2A`, `DF8101`) -- when bits 5-1 of the first byte are all set (`0x1F`), subsequent bytes form part of the tag +- **Short-form lengths** (0-127: single byte) +- **Long-form lengths** (128+: first byte encodes the count of subsequent length bytes) +- **Constructed tags** with nested TLV objects (e.g. tag `70` containing child TLVs) +- **Padding bytes** (`0x00` and `0xFF`) between TLV objects are skipped + +#### 🔧 Standalone Parsing and Building + +You can use [`TlvParser`](./NetCore8583/Tlv/TlvParser.cs) and [`TlvBuilder`](./NetCore8583/Tlv/TlvBuilder.cs) independently of [`IsoMessage`](./NetCore8583/IsoMessage.cs): + +```c# +using NetCore8583.Tlv; + +// Parse raw TLV data +byte[] rawTlv = Convert.FromHexString("9F2608A1B2C3D4E5F607089F270180"); +IReadOnlyList tags = TlvParser.Parse(rawTlv); + +foreach (var tag in tags) +{ + Console.WriteLine($"Tag: {tag.Tag}, Length: {tag.Length}, Value: {Convert.ToHexString(tag.Value)}"); + if (tag.Description != null) + Console.WriteLine($" Description: {tag.Description}"); +} +// Output: +// Tag: 9F26, Length: 8, Value: A1B2C3D4E5F60708 +// Description: Application Cryptogram +// Tag: 9F27, Length: 1, Value: 80 +// Description: Cryptogram Information Data + +// Build TLV data using the fluent API +byte[] built = new TlvBuilder() + .AddTag("9F26", new byte[] { 0xA1, 0xB2, 0xC3, 0xD4, 0xE5, 0xF6, 0x07, 0x08 }) + .AddTag("9F27", new byte[] { 0x80 }) + .AddTag("95", new byte[] { 0x00, 0x00, 0x08, 0x00, 0x00 }) + .AddTag("9A", new byte[] { 0x26, 0x04, 0x01 }) + .AddTag("9C", new byte[] { 0x00 }) + .AddTag("5F2A", new byte[] { 0x08, 0x40 }) + .AddTag("82", new byte[] { 0x19, 0x80 }) + .Build(); +``` + +#### 🔧 Constructed (Nested) Tags + +Tags whose bit 6 is set (e.g. `70`, `77`) are constructed and contain nested TLV data: + +```c# +var tags = TlvParser.Parse(rawData); +var template = tags.First(t => t.Tag == "70"); + +if (template.IsConstructed) +{ + IReadOnlyList nested = template.GetNestedTags(); + // Work with nested tags... +} +``` + +#### 📖 EMV Tag Dictionary + +The built-in [`EmvTags`](./NetCore8583/Tlv/EmvTags.cs) dictionary provides human-readable descriptions for commonly used EMV tags, sourced from the [EMV v4.3 Specification](https://www.emvco.com/specifications/) (Book 3, Annex A) and [ISO/IEC 7816-4](https://www.iso.org/standard/77180.html). The spec version is available programmatically via `EmvTags.SpecVersion`. + +```c# +string desc = EmvTags.GetDescription("9F26"); // "Application Cryptogram" +string desc2 = EmvTags.GetDescription("5F2A"); // "Transaction Currency Code" +string unknown = EmvTags.GetDescription("FF99"); // null (unknown tag) + +string version = EmvTags.SpecVersion; // "EMV v4.3" +``` + +Tags are looked up case-insensitively. The dictionary includes descriptions for the following tags (among others): + +| Tag | Description | Source | +|------|----------------------------------------------|-------------------------| +| 50 | Application Label | EMV Book 3 | +| 57 | Track 2 Equivalent Data | EMV Book 3 | +| 5A | Application Primary Account Number (PAN) | EMV Book 3 | +| 5F24 | Application Expiration Date | EMV Book 3 | +| 5F25 | Application Effective Date | EMV Book 3 | +| 5F28 | Issuer Country Code | EMV Book 3 | +| 5F2A | Transaction Currency Code | EMV Book 3 | +| 5F34 | Application PAN Sequence Number | EMV Book 3 | +| 70 | EMV Proprietary Template | ISO 7816-4 / EMV Book 1 | +| 77 | Response Message Template Format 2 | ISO 7816-4 / EMV Book 1 | +| 80 | Response Message Template Format 1 | EMV Book 3 | +| 82 | Application Interchange Profile | EMV Book 3 | +| 84 | Dedicated File (DF) Name | ISO 7816-4 / EMV Book 1 | +| 94 | Application File Locator (AFL) | EMV Book 3 | +| 95 | Terminal Verification Results | EMV Book 3 | +| 9A | Transaction Date | EMV Book 3 | +| 9C | Transaction Type | EMV Book 3 | +| 9F02 | Amount, Authorised (Numeric) | EMV Book 3 | +| 9F03 | Amount, Other (Numeric) | EMV Book 3 | +| 9F06 | Application Identifier (AID) - Terminal | EMV Book 3 | +| 9F07 | Application Usage Control | EMV Book 3 | +| 9F08 | Application Version Number (Card) | EMV Book 3 | +| 9F09 | Application Version Number (Terminal) | EMV Book 3 | +| 9F0D | Issuer Action Code - Default | EMV Book 3 | +| 9F0E | Issuer Action Code - Denial | EMV Book 3 | +| 9F0F | Issuer Action Code - Online | EMV Book 3 | +| 9F10 | Issuer Application Data | EMV Book 3 | +| 9F17 | PIN Try Counter | EMV Book 3 | +| 9F1A | Terminal Country Code | EMV Book 3 | +| 9F1E | Interface Device (IFD) Serial Number | EMV Book 3 | +| 9F21 | Transaction Time | EMV Book 3 | +| 9F26 | Application Cryptogram | EMV Book 3 | +| 9F27 | Cryptogram Information Data | EMV Book 3 | +| 9F33 | Terminal Capabilities | EMV Book 3 | +| 9F34 | Cardholder Verification Method (CVM) Results | EMV Book 3 | +| 9F35 | Terminal Type | EMV Book 3 | +| 9F36 | Application Transaction Counter (ATC) | EMV Book 3 | +| 9F37 | Unpredictable Number | EMV Book 3 | +| 9F41 | Transaction Sequence Counter | EMV Book 3 | + +> **Specification references:** +> +> - [EMVCo Specifications](https://www.emvco.com/specifications/) -- official EMV v4.3 Books 1-4 (free registration required) +> - [EMV Tag Search (UCL)](https://emvlab.cs.ucl.ac.uk/emvtags/) -- searchable EMV tag database +> - [EMV Tag List (NeaPay)](https://neapay.com/online-tools/emv-tags-list.html) -- community reference with per-tag details +> - [ISO/IEC 7816-4](https://www.iso.org/standard/77180.html) -- smart card APDU commands and data structures +> - [ISO/IEC 8825-1](https://www.iso.org/standard/73409.html) -- ASN.1 BER encoding rules + +#### 📄 XML Configuration with TLV Field + +To configure field 55 as a TLV-aware field via XML, define it in your parse template as `LLLBIN`, then register a [`TlvField`](./NetCore8583/Tlv/TlvField.cs) encoder programmatically: + +```xml + + + + + + + + +``` + +Then register the [`TlvField`](./NetCore8583/Tlv/TlvField.cs) custom encoder: + +```c# +using NetCore8583; +using NetCore8583.Tlv; + +var factory = new MessageFactory(); +factory.SetConfigPath(@"/Resources/config.xml"); +factory.SetCustomField(55, new TlvField()); + +// Parsing: field 55 is automatically decoded into IReadOnlyList +var message = factory.ParseMessage(data, 0); +var tags = (IReadOnlyList)message.GetObjectValue(55); + +// Creating: set field 55 with TLV tags +var request = factory.NewMessage(0x0100); +request.SetValue(55, tags, new TlvField(), IsoType.LLLBIN, tlvBytes.Length); +``` + +#### 🧱 Programmatic Configuration with TLV Field + +Using the [`MessageFactoryBuilder`](./NetCore8583/Builder/MessageFactoryBuilder.cs), register the TLV encoder inline: + +```c# +using NetCore8583.Builder; +using NetCore8583.Tlv; + +var factory = new MessageFactoryBuilder() + .WithCustomField(55, new TlvField()) + .WithParseMap(0x0100, p => p + .Field(3, IsoType.NUMERIC, 6) + .Field(11, IsoType.NUMERIC, 6) + .Field(55, IsoType.LLLBIN)) + .Build(); + +// Parsed messages automatically decode field 55 as TLV +var message = factory.ParseMessage(data, 0); +var tags = (IReadOnlyList)message.GetObjectValue(55); +``` + +#### 🚀 IsoMessage Extension Methods + +The easiest way to work with field 55 is via the extension methods on [`IsoMessage`](./NetCore8583/IsoMessage.cs): + +```c# +using NetCore8583.Tlv; + +// Get all TLV tags from field 55 +IReadOnlyList tags = message.GetTlvTags(); + +// Find a specific tag +TlvTag cryptogram = message.FindTlvTag("9F26"); +Console.WriteLine(Convert.ToHexString(cryptogram.Value)); // "A1B2C3D4E5F60708" + +// Get the raw TLV bytes +byte[] rawBytes = message.GetTlvBytes(); + +// Set field 55 with TLV tags +var newTags = new List +{ + new("9F26", 8, new byte[] { 0xA1, 0xB2, 0xC3, 0xD4, 0xE5, 0xF6, 0x07, 0x08 }), + new("9F27", 1, new byte[] { 0x80 }), + new("82", 2, new byte[] { 0x19, 0x80 }) +}; +message.SetTlvTags(newTags); +``` + +These extension methods handle all underlying formats transparently -- they work whether the field value is already parsed as `IReadOnlyList`, stored as raw `byte[]`, or stored as a hex string. + ### 🧱 Programmatic Configuration (Builder API) If you prefer to configure the [`MessageFactory`](./NetCore8583/MessageFactory.cs) entirely in code -- without any XML files -- you can use the [`MessageFactoryBuilder`](./NetCore8583/Builder/MessageFactoryBuilder.cs). It provides a fluent API that supports all the same features as XML configuration: headers, templates, parse maps, inheritance, composite fields, and custom field encoders. @@ -388,7 +613,7 @@ var factory = new MessageFactoryBuilder() All [`MessageFactory`](./NetCore8583/MessageFactory.cs) properties can be set through the builder: | Method | Description | -| ------------------------------------------- | ------------------------------------------------- | +|---------------------------------------------|---------------------------------------------------| | `WithEncoding(Encoding)` | Character encoding for messages and fields | | `WithForceStringEncoding()` | Force string encoding for variable-length headers | | `WithRadix(int)` | Radix for length headers (default: 10) | @@ -449,4 +674,8 @@ var response = factory.CreateResponse(request); ## 📚 Resources -- [ISO 8583](http://en.wikipedia.org/wiki/ISO_8583) +- [ISO 8583](http://en.wikipedia.org/wiki/ISO_8583) -- message format for financial transactions +- [EMVCo Specifications](https://www.emvco.com/specifications/) -- official EMV v4.3 contact and contactless specifications +- [EMV Tag Search (UCL)](https://emvlab.cs.ucl.ac.uk/emvtags/) -- searchable EMV tag database +- [ISO/IEC 7816-4](https://www.iso.org/standard/77180.html) -- smart card APDU commands and TLV data structures +- [ISO/IEC 8825-1](https://www.iso.org/standard/73409.html) -- ASN.1 BER-TLV encoding rules