Produced by Araxis Merge on 10/26/2017 10:44:23 PM Eastern Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | Fri Oct 27 02:44:23 2017 UTC | ||
| 2 | OSCIF_BMS_v2_iter 2_September_2017.zip\BMS_Cand\Source\Sources\BMS.Vista.TestEis\BMS.Utils | CryptoRandom.cs | Wed Oct 18 18:47:02 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 0 | 0 |
| Changed | 0 | 0 |
| Inserted | 1 | 53 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | using Syst em; | |||||
| 2 | using Syst em.Collect ions.Gener ic; | |||||
| 3 | using Syst em.Linq; | |||||
| 4 | using Syst em.Text; | |||||
| 5 | using Syst em.Securit y.Cryptogr aphy; | |||||
| 6 | using Syst em.IO; | |||||
| 7 | ||||||
| 8 | namespace BMS.Utils | |||||
| 9 | { | |||||
| 10 | public class Cry ptoRandom : RandomNu mberGenera tor | |||||
| 11 | { | |||||
| 12 | pr ivate stat ic RandomN umberGener ator r; | |||||
| 13 | ||||||
| 14 | pu blic Crypt oRandom() | |||||
| 15 | { | |||||
| 16 | r = Rand omNumberGe nerator.Cr eate(); | |||||
| 17 | } | |||||
| 18 | ||||||
| 19 | pu blic overr ide void G etBytes(by te[] data) | |||||
| 20 | { | |||||
| 21 | r.GetByt es(data); | |||||
| 22 | } | |||||
| 23 | ||||||
| 24 | pu blic overr ide void G etNonZeroB ytes(byte[ ] data) | |||||
| 25 | { | |||||
| 26 | r.GetNon ZeroBytes( data); | |||||
| 27 | } | |||||
| 28 | ||||||
| 29 | pu blic doubl e NextDoub le() | |||||
| 30 | { | |||||
| 31 | byte[] b = new byt e[4]; | |||||
| 32 | r.GetByt es(b); | |||||
| 33 | return ( double)Bit Converter. ToUInt32(b , 0) / ((d ouble)UInt 32.MaxValu e+1); | |||||
| 34 | } | |||||
| 35 | ||||||
| 36 | pu blic int N ext(int mi nValue, in t maxValue ) | |||||
| 37 | { | |||||
| 38 | long ran ge = (long )(maxValue - minValu e); | |||||
| 39 | return ( int) Math. Floor(Next Double() * range) + minValue; | |||||
| 40 | } | |||||
| 41 | ||||||
| 42 | pu blic int N ext() | |||||
| 43 | { | |||||
| 44 | return N ext(0, Int 32.MaxValu e); | |||||
| 45 | } | |||||
| 46 | ||||||
| 47 | pu blic int N ext(int ma xValue) | |||||
| 48 | { | |||||
| 49 | return N ext(0, max Value); | |||||
| 50 | } | |||||
| 51 | ||||||
| 52 | } | |||||
| 53 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.