Giter Site home page Giter Site logo

oneineight / p6-digest-sha1-native Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bduggan/raku-digest-sha1-native

0.0 0.0 0.0 58 KB

SHA1 in Raku using NativeCall - alternative version that uses OpenSSL libcrypto

License: Artistic License 2.0

C 66.16% Makefile 2.66% Raku 31.19%

p6-digest-sha1-native's Introduction

Digest::SHA1::Native

Fast SHA1 computation using NativeCall to C.

Build Status

Synopsis

use Digest::SHA1::Native;

say sha1-hex("The quick brown fox jumps over the lazy dog");
say sha1-hex("The quick brown fox jumps over the lazy dog".encode);
say sha1("The quick brown fox jumps over the lazy dog")».fmt('%02x').join;
2fd4e1c67a2d28fced849ee1bb76e7391b93eb12
2fd4e1c67a2d28fced849ee1bb76e7391b93eb12
2fd4e1c67a2d28fced849ee1bb76e7391b93eb12

Description

sha1-hex accepts a string or bytes (a Buf or Blob) and returns a hex string.

sha1 converts the hex into binary (i.e. it returns a Blob).

Examples

From https://en.wikipedia.org/wiki/Hash-based_message_authentication_code#Examples:

use Digest::HMAC;
use Digest::SHA1::Native;

say hmac-hex("key","The quick brown fox jumps over the lazy dog",&sha1);

de7c9b85b8b78aa6bc8a7a36f70a90701c9db4d9

p6-digest-sha1-native's People

Contributors

altai-man avatar bduggan avatar dwarring avatar jnthn avatar niner avatar ugexe avatar zoffixznet avatar

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.