Giter Site home page Giter Site logo

sha3.net's Introduction

Build status NuGet GitHub license

N|Solid

sha3.net

C# port of Keccak, known as SHA3, based on Bouncy Castle library

How to use it

  • Just call any of the four static methods to return the SHA3 with the desired block size

Sha3.Sha3224()

Sha3.Sha3256()

Sha3.Sha3384()

Sha3.Sha3512()

and then call the ComputeHash method:

using (var shaAlg = Sha3.Sha3256())
{   
    var hash = shaAlg.ComputeHash(Encoding.UTF8.GetBytes("abc"));
}

Logo Provided by Vecteezy

sha3.net's People

Contributors

dariogriffo avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

sha3.net's Issues

keccak256 c# not match solidity

Hi @dariogriffo
`cs

using (var shaAlg = Sha3.Sha3256())
{
var hash = shaAlg.ComputeHash(Encoding.UTF8.GetBytes("11"));
return hash.ToHex(false);
}
`
//result 4410fc15c5a3cde7a2b5366a41dbc95e6547a6021efdff98cfcd5e875e8c3c70

function Insert(string memory transactionId)public pure returns (bytes32) { bytes32 id = keccak256(bytes(transactionId)); return id; }
result
0x7880aec93413f117ef14bd4e6d130875ab2c7d7d55a064fac3c2f7bd51516380

Then this result not match

Salt supported?

Is it possible somehow to pass a salt key with this? As we need to match it similar to this
https://wtools.io/generate-hmac-hash using SHA3-512 + salt key

So given the following:
Content: Hello
Salt key: 1234
Hash type: sha3-512
Should result: 8f8a3752ee05d4465f1747918016fe2dd28fc487652efc2d32a8bce90cf8f4e53de87eccd6c0386ec18811ca8cbf37927a47b5266fb16373194be9a9b105f809

Any help would be appreciated

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.