equal
deleted
inserted
replaced
1 "{ Package: 'exept:regression' }" |
1 "{ Package: 'exept:regression' }" |
2 |
2 |
3 "{ NameSpace: RegressionTests }" |
3 "{ NameSpace: RegressionTests }" |
4 |
4 |
5 TestCase subclass:#CryptTests |
5 TestCase subclass:#CryptTests |
6 instanceVariableNames:'' |
6 instanceVariableNames:'' |
7 classVariableNames:'' |
7 classVariableNames:'' |
8 poolDictionaries:'' |
8 poolDictionaries:'' |
9 category:'tests-Regression' |
9 category:'tests-Regression' |
10 ! |
10 ! |
11 |
11 |
12 !CryptTests class methodsFor:'documentation'! |
12 !CryptTests class methodsFor:'documentation'! |
13 |
13 |
14 documentation |
14 documentation |
308 |
308 |
309 ks decrypt:cipher. |
309 ks decrypt:cipher. |
310 |
310 |
311 self assert:(ks stream contents asString = plain). |
311 self assert:(ks stream contents asString = plain). |
312 |
312 |
|
313 "/ ------------------------------------------- |
|
314 |
|
315 ks := RSACryptStream new. |
|
316 ks encryptWithSecretKey:true. |
|
317 ks key:key. |
|
318 ks stream:#[] writeStream. |
|
319 |
|
320 plain := #[16rFF 16r80 16r00]. |
|
321 ks encrypt:plain. |
|
322 cipher := ks stream contents. |
|
323 |
|
324 ks := RSACryptStream new. |
|
325 ks encryptWithSecretKey:true. |
|
326 ks key:key. |
|
327 ks stream:#[] writeStream. |
|
328 |
|
329 ks decrypt:cipher. |
|
330 |
|
331 self assert:(ks stream contents = plain). |
|
332 |
313 " |
333 " |
314 self run:#test11_rsaKey |
334 self run:#test11_rsaKey |
315 self new test11_rsaKey |
335 self new test11_rsaKey |
316 " |
336 " |
317 |
337 |