Skip to content

Commit

Permalink
Fix docs and naming (#29)
Browse files Browse the repository at this point in the history
Fix docs and naming
  • Loading branch information
L3tum authored Sep 2, 2019
2 parents b917384 + 6ce14b7 commit 9054b10
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
12 changes: 6 additions & 6 deletions Benchmarking/BenchmarkRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class BenchmarkRunner
public static readonly string[] AvailableBenchmarks =
{
"ZIP", "GZIP", "BZIP2", "DEFLATE", "BROTLI", "ARITHMETIC_INT", "ARITHMETIC_FLOAT", "AVX", "SSE",
"ENCRYPTION", "DECRYPTION", "CSRPNG",
"ENCRYPTION", "DECRYPTION", "CSPRNG",
"ALL", "COMPRESSION", "ARITHMETIC", "EXTENSION", "CRYPTOGRAPHY",
"INT", "FLOAT"
};
Expand Down Expand Up @@ -122,9 +122,9 @@ public void RunBenchmark()
break;
}

case "CSRPNG":
case "CSPRNG":
{
benchmarksToRun.Add(new CSRPNG(options));
benchmarksToRun.Add(new CSPRNG(options));

break;
}
Expand Down Expand Up @@ -160,7 +160,7 @@ public void RunBenchmark()
{
benchmarksToRun.Add(new Encryption(options));
benchmarksToRun.Add(new Decryption(options));
benchmarksToRun.Add(new CSRPNG(options));
benchmarksToRun.Add(new CSPRNG(options));

break;
}
Expand All @@ -170,7 +170,7 @@ public void RunBenchmark()
benchmarksToRun.Add(new Integer(options));
benchmarksToRun.Add(new Encryption(options));
benchmarksToRun.Add(new Decryption(options));
benchmarksToRun.Add(new CSRPNG(options));
benchmarksToRun.Add(new CSPRNG(options));

break;
}
Expand All @@ -192,7 +192,7 @@ public void RunBenchmark()
benchmarksToRun.Add(new Integer(options));
benchmarksToRun.Add(new Encryption(options));
benchmarksToRun.Add(new Decryption(options));
benchmarksToRun.Add(new CSRPNG(options));
benchmarksToRun.Add(new CSPRNG(options));
benchmarksToRun.Add(new Float(options));
benchmarksToRun.Add(new AVX(options));
benchmarksToRun.Add(new SSE(options));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
#region using

using System;
using System.Security.Cryptography;
using System.Threading.Tasks;

#endregion

namespace Benchmarking.Cryptography
{
internal class CSRPNG : Benchmark
internal class CSPRNG : Benchmark
{
public CSRPNG(Options options) : base(options)
public CSPRNG(Options options) : base(options)
{
}

Expand All @@ -25,7 +24,7 @@ public override void Run()
var data = new byte[1000000000 / options.Threads];
var csrpng = RandomNumberGenerator.Create();

for (int j = 0; j < 64; j++)
for (var j = 0; j < 64; j++)
{
csrpng.GetBytes(data);
}
Expand Down
7 changes: 7 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ To combine the above
* COMPRESSION (runs all compression benchmarks)
* ARITHMETIC (runs all arithmetic benchmarks)
* EXTENSION (runs all instruction extension benchmarks)
* CRYPTOGRAPHY (runs all cryptography benchmarks)
* INT (runs all integer-related benchmarks)
* FLOAT (runs all float-related benchmarks)

Expand All @@ -62,6 +63,12 @@ To combine the above
* AVX
* SSE

### Cryptography

* Encryption
* Decryption
* CSPRNG (cryptographically secure pseudo-random number generator)

More will be added in the future :)

## References
Expand Down

0 comments on commit 9054b10

Please sign in to comment.