Click here to Skip to main content
Licence CPOL
First Posted 17 Sep 2005
Views 17,838
Downloads 23
Bookmarked 7 times

ENT - A Pseudorandom Number Sequence Test Program (C# Port)

By Brett Trotter | 17 Sep 2005
A C# port of John Walker's ENT for measuring randomness of test files.
1 vote, 100.0%
1

2

3

4

5
1.00/5 - 1 vote
μ 1.00, σa 5.00 [?]

Sample Image - enttitle.gif

Introduction

This is a C# library which is a port of John Walker's ENT- a pseudorandom sequence analyzer. My implementation is not 100% complete, but has all of the main aspects.

To use this ENT class, simply instantiate an EntCalc, and perform an AddSample for each byte, or use the overloads to add an entire byte array. When all samples have been added, call EndCalculation() which will return a struct with all of the results.

I have also included a simple class which you can pass in an IO stream or a filename, and it will run through the stream/file and perform the calculation, returning the struct.

Caveats

Unfortunately, I don't understand all of the math behind these calculations, and the code is more or less a direct copy of his work, just ported from C++ using C# functions.

I emailed a copy to the original author, but received no reply. Since his software is in the public domain, I offer this as well, but take no real credit for it, no more than someone who translated a document from another language.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Brett Trotter

Systems Engineer
BT Technical Services
United States United States

Member


Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
QuestionAny Updates? Pinmembertadkowski20:21 13 Jul '06  
AnswerRe: Any Updates? PinmemberBrett Trotter0:13 13 Sep '07  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web02 | 2.5.120210.1 | Last Updated 18 Sep 2005
Article Copyright 2005 by Brett Trotter
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid