Giter VIP home page Giter VIP logo

onix-labs / onixlabs-dotnet Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 2.0 748 KB

ONIXLabs .NET Library - Includes powerful APIs for functional and object-oriented programming, security, cryptography and numerics.

License: Apache License 2.0

C# 99.96% Shell 0.04%
base16 base32 base58 base64 bigdecimal cryptography digital-signatures ecdsa extension-methods fips-202 generic-math hashing number-information numerics public-private-key rsa salt sha3 sha3-shake

onixlabs-dotnet's People

Contributors

mrmatthewlayton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

onixlabs-dotnet's Issues

TransformBlock\TransformFinalBlock does not work correctly or is not supported

byte[] inputBuffer = Encoding.UTF8.GetBytes("abc");
//OK 3A985DA74FE225B2045C172D6BD390BD855F086E3E9D525B46BFE24511431532
Console.WriteLine(BitConverter.ToString(/*SHA256.Create()*/new Sha3Hash256().ComputeHash(inputBuffer)).Replace("-", ""));
using (HashAlgorithm hashAlgorithm = /*SHA256.Create()*/new Sha3Hash256()) {
    //hashAlgorithm.Initialize();
    hashAlgorithm.TransformBlock(inputBuffer, 0, inputBuffer.Length, null, 0);
    hashAlgorithm.TransformFinalBlock(new byte[0], 0, 0);
    //ERR A7FFC6F8BF1ED76651C14756A061D662F580FF4DE43B49FA82D80A4B80F8434A
    Console.WriteLine(BitConverter.ToString(hashAlgorithm.Hash).Replace("-", ""));
}

Sha3.HashCore starts with a call to Initialize. As far as I understand, HashCore should not constantly reset the state if the implementation involves multiple calls to HashAlgorithm.TransformBlock. Or is there perhaps another way to pass data in portions?

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.