forked from blackmennewstyle/miningcore
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
58cca80
commit f2668a0
Showing
3 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using Miningcore.Contracts; | ||
using Miningcore.Native; | ||
|
||
namespace Miningcore.Crypto.Hashing.Algorithms; | ||
|
||
[Identifier("yespowermgpc")] | ||
public unsafe class YespowerMGPC : IHashAlgorithm | ||
{ | ||
public void Digest(ReadOnlySpan<byte> data, Span<byte> result, params object[] extra) | ||
{ | ||
Contract.Requires<ArgumentException>(result.Length >= 32); | ||
|
||
fixed (byte* input = data) | ||
{ | ||
fixed (byte* output = result) | ||
{ | ||
Multihash.yespowerMGPC(input, output, (uint) data.Length); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters