c# pow implementation work
This commit is contained in:
parent
60c1ec07e9
commit
499981ed52
5 changed files with 34 additions and 8 deletions
|
@ -1,5 +1,7 @@
|
|||
using System;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using onionrpow;
|
||||
|
||||
|
@ -9,8 +11,18 @@ namespace onionrpow_cli
|
|||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("Hello World!");
|
||||
onionrpow.OnionrPow.compute(Encoding.UTF8.GetBytes("test"), 4);
|
||||
|
||||
using (Stream stdin = Console.OpenStandardInput())
|
||||
{
|
||||
var data = new List<byte>();
|
||||
byte[] buffer = new byte[60000];
|
||||
int bytes;
|
||||
while ((bytes = stdin.Read(buffer, 0, buffer.Length)) > 0) {
|
||||
//stdout.Write(buffer, 0, bytes);
|
||||
data.AddRange(buffer);
|
||||
}
|
||||
onionrpow.OnionrPow.compute(data.ToArray(), 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue