Onionr/pow-csharp/onionrpow-cli/Program.cs

29 lines
721 B
C#
Raw Normal View History

2020-09-19 21:01:22 +00:00
using System;
using System.Text;
2020-09-20 21:13:46 +00:00
using System.IO;
using System.Collections.Generic;
2020-09-19 21:01:22 +00:00
using onionrpow;
namespace onionrpow_cli
{
class Program
{
static void Main(string[] args)
{
2020-09-20 21:13:46 +00:00
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);
}
2020-09-21 07:10:10 +00:00
onionrpow.OnionrPow.compute(data.ToArray(), 1);
2020-09-20 21:13:46 +00:00
}
2020-09-19 21:01:22 +00:00
}
}
}