Skip to content
This repository was archived by the owner on Aug 11, 2023. It is now read-only.

Commit 9205efc

Browse files
committed
feat: Source code compatibility wizh .NET 6.
chore: Added all necessary options and imports. fix: Use integers for counts in BitManipulationHelper.
1 parent d063f47 commit 9205efc

48 files changed

Lines changed: 566 additions & 153 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [2.4.0] - 2022-11-23
8+
9+
### Changed
10+
- Bit manipulation uses integers for counts.
11+
- Source code adapted for compatibility with .NET 6.
12+
- Set all necessary options and imports in all files.
13+
- Namespace changed to "TUPWLib".
14+
715
## [2.3.3] - 2021-10-18
816

917
### Changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,23 @@ But it is still shorter than using the hexadecimal representation of the encrypt
113113

114114
The encrypted data can only be decrypted with the same key sources and the same subject string.
115115

116+
## Programming
117+
118+
The name space for the library is `TUPWLib`.
119+
This is a change from the former version that used another name space.
120+
121+
The source code is compatible with `.NET 6`.
122+
One can use the same source code for `.NET Framework 4.8` and `.NET 6`.
123+
The solution (`.sln`) and project (`.vbproj`) files in this repository are made for `.NET Framework 4.8`.
124+
If one wants to use `.NET 6` or later one just has to set up a `.NET 6` library project and import the files in the `Arrays`, `Crypto`, `Numbers` and `Statistics` folders.
125+
116126
## Command Line Program
117127

118128
One can write a command line program that uses the interface that is present in this library:
119129

120130
```csharp
121131
using System;
122-
using DB.BCM.TUPW;
132+
using TUPWLib;
123133

124134
namespace TUPWCommandLine
125135
{

TUPWLib/Arrays/ArrayHelper.vb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'
2-
' SPDX-FileCopyrightText: 2020 DB Systel GmbH
2+
' SPDX-FileCopyrightText: 2022 DB Systel GmbH
33
'
44
' SPDX-License-Identifier: Apache-2.0
55
'
@@ -28,6 +28,8 @@
2828
' 2020-10-26: V1.0.4: Added a few comments re. the use of non-short-circuit logic.
2929
' 2021-08-27: V1.1.0: Added SafeClear method.
3030
'
31+
Option Strict On
32+
Option Explicit On
3133

3234
''' <summary>
3335
''' Class with all the array methods missing from the <see cref="Array"/> class.

TUPWLib/Arrays/Base32Encoding.vb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'
2-
' SPDX-FileCopyrightText: 2021 DB Systel GmbH
2+
' SPDX-FileCopyrightText: 2022 DB Systel GmbH
33
'
44
' SPDX-License-Identifier: Apache-2.0
55
'
@@ -28,6 +28,9 @@
2828
' 2021-05-12: V1.3.0: Direct mapping of a byte value to a char.
2929
'
3030

31+
Option Strict On
32+
Option Explicit On
33+
3134
''' <summary>
3235
''' Converts byte arrays from and to Base32 encoding either, as specified in RFC4868, or in spell-safe format.
3336
''' </summary>

TUPWLib/Arrays/UnpaddedBase64.vb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'
2-
' SPDX-FileCopyrightText: 2020 DB Systel GmbH
2+
' SPDX-FileCopyrightText: 2022 DB Systel GmbH
33
'
44
' SPDX-License-Identifier: Apache-2.0
55
'
@@ -25,6 +25,9 @@
2525
' 2020-05-18: V1.0.1: Added null check.
2626
'
2727

28+
Option Strict On
29+
Option Explicit On
30+
2831
''' <summary>
2932
''' Wrapper for unpadded Base64 conversions.
3033
''' </summary>

TUPWLib/Crypto/ArbitraryTailPadding.vb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'
2-
' SPDX-FileCopyrightText: 2020 DB Systel GmbH
2+
' SPDX-FileCopyrightText: 2022 DB Systel GmbH
33
'
44
' SPDX-License-Identifier: Apache-2.0
55
'
@@ -25,6 +25,9 @@
2525
' 2020-08-13: V1.0.1: Improved GetPaddingByteValue method.
2626
'
2727

28+
Option Strict On
29+
Option Explicit On
30+
2831
''' <summary>
2932
''' Arbitrary tail padding for block ciphers.
3033
''' </summary>

TUPWLib/Crypto/ByteArrayBlinding.vb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'
2-
' SPDX-FileCopyrightText: 2020 DB Systel GmbH
2+
' SPDX-FileCopyrightText: 2022 DB Systel GmbH
33
'
44
' SPDX-License-Identifier: Apache-2.0
55
'
@@ -27,6 +27,9 @@
2727
' 2021-07-13: V1.1.0: Simplified blinding.
2828
'
2929

30+
Option Strict On
31+
Option Explicit On
32+
3033
''' <summary>
3134
''' Blinding for byte arrays.
3235
''' </summary>

TUPWLib/Crypto/CounterModeCryptoTransform.vb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'
2-
' SPDX-FileCopyrightText: 2020 DB Systel GmbH
2+
' SPDX-FileCopyrightText: 2022 DB Systel GmbH
33
'
44
' SPDX-License-Identifier: Apache-2.0
55
'
@@ -30,6 +30,9 @@
3030
' 2021-09-03: V2.1.0: Fortify finding: Dispose of symmetric encryption algorithm only if we instantiated it ourselves.
3131
'
3232

33+
Option Strict On
34+
Option Explicit On
35+
3336
Imports System.Security.Cryptography
3437

3538
''' <summary>

TUPWLib/Crypto/DataIntegrityException.vb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'
2-
' SPDX-FileCopyrightText: 2020 DB Systel GmbH
2+
' SPDX-FileCopyrightText: 2022 DB Systel GmbH
33
'
44
' SPDX-License-Identifier: Apache-2.0
55
'
@@ -24,6 +24,9 @@
2424
' 2020-04-29: V1.0.0: Created.
2525
'
2626

27+
Option Strict On
28+
Option Explicit On
29+
2730
Imports System.Runtime.Serialization
2831

2932
''' <summary>

TUPWLib/Crypto/FileAndKeyEncryption.vb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'
2-
' SPDX-FileCopyrightText: 2020 DB Systel GmbH
2+
' SPDX-FileCopyrightText: 2022 DB Systel GmbH
33
'
44
' SPDX-License-Identifier: Apache-2.0
55
'
@@ -28,6 +28,9 @@
2828
' 2021-09-03: V2.1.1: Fortify finding: Removed unused "CheckState" method.
2929
'
3030

31+
Option Strict On
32+
Option Explicit On
33+
3134
Imports System.IO
3235

3336
''' <summary>

0 commit comments

Comments
 (0)