The Trunk: System-fbs.615.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: System-fbs.615.mcz

commits-2
Frank Shearar uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-fbs.615.mcz

==================== Summary ====================

Name: System-fbs.615
Author: fbs
Time: 19 November 2013, 5:39:02.356 pm
UUID: 4ae2bc64-66ae-a64b-8549-2f58f4081308
Ancestors: System-nice.614

Don't use two identical implementations where one will do.

=============== Diff against System-nice.614 ===============

Item was changed:
  ----- Method: DigitalSignatureAlgorithm>>initRandomFromUser (in category 'initialization') -----
  initRandomFromUser
  "Ask the user to type a long random string and use the result to seed the secure random number generator."
 
+ ^ self initRandomFromString: (UIManager default request: 'Enter a long random string to seed the random generator.').!
- | s k srcIndex |
- s := UIManager default request: 'Enter a long random string to seed the random generator.'.
- k := LargePositiveInteger new: (s size min: 64).
- srcIndex := 0.
- k digitLength to: 1 by: -1 do: [:i |
- k digitAt: i put: (s at: (srcIndex := srcIndex + 1)) asciiValue].
- k := k normalize + (Random new next * 16r7FFFFFFF) asInteger.  "a few additional bits randomness"
- k highBit > 512 ifTrue: [k := k bitShift: k highBit - 512].
- self initRandom: k.
- !