@@ -28,15 +28,6 @@ public void Aes128BytesEncrypt()
2828 Assert . NotEqual ( dataToEncrypt , encrypted ) ;
2929 }
3030
31- [ Fact ]
32- public void Aes128BytesEncryptThreadpool ( )
33- {
34- byte [ ] nonceKey = this . _aESWrapper . GenerateAESNonceThreadpool ( ) ;
35- byte [ ] key = this . _aESWrapper . Aes128Key ( ) ;
36- byte [ ] dataToEncrypt = Encoding . UTF8 . GetBytes ( "ThisisthedatathatneedstobeEncrypted#@$*(&" ) ;
37- byte [ ] encrypted = this . _aESWrapper . Aes128EncryptThreadpool ( nonceKey , key , dataToEncrypt ) ;
38- Assert . NotEqual ( dataToEncrypt , encrypted ) ;
39- }
4031
4132 [ Fact ]
4233 public void AesNonce ( )
@@ -45,27 +36,13 @@ public void AesNonce()
4536 Assert . True ( nonceKey . Length == 12 ) ;
4637 }
4738
48- [ Fact ]
49- public void AesNonceThreadpool ( )
50- {
51- byte [ ] nonceKey = this . _aESWrapper . GenerateAESNonceThreadpool ( ) ;
52- Assert . True ( nonceKey . Length == 12 ) ;
53- }
54-
5539 [ Fact ]
5640 public void Aes128Key ( )
5741 {
5842 byte [ ] key = this . _aESWrapper . Aes128Key ( ) ;
5943 Assert . NotEmpty ( key ) ;
6044 }
6145
62- [ Fact ]
63- public void Aes128KeyThreadpool ( )
64- {
65- byte [ ] key = this . _aESWrapper . Aes128KeyThreadpool ( ) ;
66- Assert . NotEmpty ( key ) ;
67- }
68-
6946 [ Fact ]
7047 public void Aes128BytesDecrypt ( )
7148 {
@@ -78,17 +55,6 @@ public void Aes128BytesDecrypt()
7855 Assert . Equal ( dataToEncrypt , decrypted ) ;
7956 }
8057
81- [ Fact ]
82- public void Aes128BytesDecryptThreadpool ( )
83- {
84-
85- byte [ ] nonceKey = this . _aESWrapper . GenerateAESNonceThreadpool ( ) ;
86- byte [ ] key = this . _aESWrapper . Aes128Key ( ) ;
87- byte [ ] dataToEncrypt = Encoding . ASCII . GetBytes ( "Thisisthedatathatne1233123123123123123edstobeEncrypted#@$*(&" ) ;
88- byte [ ] encrypted = this . _aESWrapper . Aes128EncryptThreadpool ( nonceKey , key , dataToEncrypt ) ;
89- byte [ ] decrypted = this . _aESWrapper . Aes128DecryptThreadpool ( nonceKey , key , encrypted ) ;
90- Assert . Equal ( dataToEncrypt , decrypted ) ;
91- }
9258
9359 [ Fact ]
9460 public void Aes256Key ( )
@@ -97,13 +63,6 @@ public void Aes256Key()
9763 Assert . NotEmpty ( key ) ;
9864 }
9965
100- [ Fact ]
101- public void Aes256KeyThreadpool ( )
102- {
103- byte [ ] key = this . _aESWrapper . Aes256KeyThreadpool ( ) ;
104- Assert . NotEmpty ( key ) ;
105- }
106-
10766 [ Fact ]
10867 public void Aes256X25519DiffieHellmanKeyAndNonce ( )
10968 {
@@ -118,20 +77,6 @@ public void Aes256X25519DiffieHellmanKeyAndNonce()
11877 Assert . Equal ( aliceAesKeyAndNonce . AesKey , bobAesKeyAndNonce . AesKey ) ;
11978 }
12079
121- [ Fact ]
122- public void Aes256X25519DiffieHellmanKeyAndNonceThreadpool ( )
123- {
124- X25519SecretPublicKey aliceSecretAndPublicKey = this . _x25519Wrapper . GenerateSecretAndPublicKey ( ) ; // TODO: switch to threadpool implementation
125- X25519SecretPublicKey bobSecretAndPublicKey = this . _x25519Wrapper . GenerateSecretAndPublicKey ( ) ; // TODO: switch to threadpool implementation
126- X25519SharedSecret aliceSharedSecet = this . _x25519Wrapper . GenerateSharedSecret ( aliceSecretAndPublicKey . SecretKey , bobSecretAndPublicKey . PublicKey ) ;
127- X25519SharedSecret bobSharedSecet = this . _x25519Wrapper . GenerateSharedSecret ( bobSecretAndPublicKey . SecretKey , aliceSecretAndPublicKey . PublicKey ) ;
128- Aes256KeyAndNonceX25519DiffieHellman aliceAesKeyAndNonce = this . _aESWrapper . Aes256KeyNonceX25519DiffieHellmanThreadpool ( aliceSharedSecet . SharedSecret ) ;
129- Aes256KeyAndNonceX25519DiffieHellman bobAesKeyAndNonce = this . _aESWrapper . Aes256KeyNonceX25519DiffieHellmanThreadpool ( bobSharedSecet . SharedSecret ) ;
130-
131- Assert . True ( aliceAesKeyAndNonce . AesNonce . SequenceEqual ( bobAesKeyAndNonce . AesNonce ) ) ;
132- Assert . Equal ( aliceAesKeyAndNonce . AesKey , bobAesKeyAndNonce . AesKey ) ;
133- }
134-
13580 [ Fact ]
13681 public void Aes128X25519DiffieHellmanKeyAndNonce ( )
13782 {
@@ -146,20 +91,6 @@ public void Aes128X25519DiffieHellmanKeyAndNonce()
14691 Assert . Equal ( aliceAesKeyAndNonce . AesKey , bobAesKeyAndNonce . AesKey ) ;
14792 }
14893
149- [ Fact ]
150- public void Aes128X25519DiffieHellmanKeyAndNonceThreadpool ( )
151- {
152- X25519SecretPublicKey aliceSecretAndPublicKey = this . _x25519Wrapper . GenerateSecretAndPublicKey ( ) ; // TODO: switch to threadpool implementation
153- X25519SecretPublicKey bobSecretAndPublicKey = this . _x25519Wrapper . GenerateSecretAndPublicKey ( ) ; // TODO: switch to threadpool implementation
154- X25519SharedSecret aliceSharedSecet = this . _x25519Wrapper . GenerateSharedSecret ( aliceSecretAndPublicKey . SecretKey , bobSecretAndPublicKey . PublicKey ) ;
155- X25519SharedSecret bobSharedSecet = this . _x25519Wrapper . GenerateSharedSecret ( bobSecretAndPublicKey . SecretKey , aliceSecretAndPublicKey . PublicKey ) ;
156- Aes256KeyAndNonceX25519DiffieHellman aliceAesKeyAndNonce = this . _aESWrapper . Aes128KeyNonceX25519DiffieHellmanThreadpool ( aliceSharedSecet . SharedSecret ) ;
157- Aes256KeyAndNonceX25519DiffieHellman bobAesKeyAndNonce = this . _aESWrapper . Aes128KeyNonceX25519DiffieHellmanThreadpool ( bobSharedSecet . SharedSecret ) ;
158-
159- Assert . True ( aliceAesKeyAndNonce . AesNonce . SequenceEqual ( bobAesKeyAndNonce . AesNonce ) ) ;
160- Assert . Equal ( aliceAesKeyAndNonce . AesKey , bobAesKeyAndNonce . AesKey ) ;
161- }
162-
16394 [ Fact ]
16495 public void Aes256BytesEncrypt ( )
16596 {
@@ -170,16 +101,6 @@ public void Aes256BytesEncrypt()
170101 Assert . NotEqual ( dataToEncrypt , encrypted ) ;
171102 }
172103
173- [ Fact ]
174- public void Aes256BytesEncryptThreadpool ( )
175- {
176- byte [ ] nonceKey = this . _aESWrapper . GenerateAESNonceThreadpool ( ) ;
177- byte [ ] key = this . _aESWrapper . Aes256KeyThreadpool ( ) ;
178- byte [ ] dataToEncrypt = Encoding . UTF8 . GetBytes ( "ThisisthedatathatneedstobeEncrypted#@$*(&" ) ;
179- byte [ ] encrypted = this . _aESWrapper . Aes256EncryptThreadpool ( nonceKey , key , dataToEncrypt ) ;
180- Assert . NotEqual ( dataToEncrypt , encrypted ) ;
181- }
182-
183104 [ Fact ]
184105 public void Aes256BytesDecrypt ( )
185106 {
@@ -192,18 +113,6 @@ public void Aes256BytesDecrypt()
192113 Assert . NotEqual ( dataToEncrypt , encrypted ) ;
193114 }
194115
195- [ Fact ]
196- public void Aes256BytesDecryptThreadpool ( )
197- {
198- byte [ ] nonceKey = this . _aESWrapper . GenerateAESNonceThreadpool ( ) ;
199- byte [ ] key = this . _aESWrapper . Aes256KeyThreadpool ( ) ;
200- byte [ ] dataToEncrypt = Encoding . UTF8 . GetBytes ( "ThisisthedatathatneedstobeEncrypted#@$*(&" ) ;
201- byte [ ] encrypted = this . _aESWrapper . Aes256EncryptThreadpool ( nonceKey , key , dataToEncrypt ) ;
202- byte [ ] decrypted = this . _aESWrapper . Aes256DecryptThreadpool ( nonceKey , key , encrypted ) ;
203- Assert . Equal ( dataToEncrypt , decrypted ) ;
204- Assert . NotEqual ( dataToEncrypt , encrypted ) ;
205- }
206-
207116 [ Fact ]
208117 public void Aes256X25519DiffieHellmanEncrypt ( )
209118 {
0 commit comments