Git Product home page Git Product logo

erlsha2's Introduction

SHA-224, SHA-256, SHA-384, SHA-512 implemented in Erlang NIFs.

Description

The erlsha2 library application implements the SHA-2 Secure Hash Standard (SHA-224, SHA-256, SHA-384, SHA-512) using Erlang NIFs. (It also provides pure Erlang implementations, though they are much slower than the C NIF implementations.) It also includes HMAC wrappers for the SHA-2 functions.

See the following links for details:

The code implemented here was written by simply following the algorithm descriptions provided in the standard. Provided functions follow the same style as those found in the standard Erlang crypto module: for each hash variant there's a simple function returning a binary digest and a set of three functions for initializing a digest context, updating the context with additional data to be hashed, and finalizing the context to get a binary digest result.

This implementation replaces and obsoletes the original pure Erlang implementation.

Building and Installing

The erlsha2 app is built with rebar, which must be in the command PATH.

I don't use Windows at all so I doubt it builds there. I don't know of any reason it shouldn't work there, though; you'll just have to build it manually. If nothing else, you could comment out the on_load directive in the Erlang file to prevent it from loading the NIF implementation, thereby gaining access to the pure Erlang implementation instead, but note that it's much slower than the C code.

If you run into any build trouble, first make sure the version of rebar you're using is reasonably up to date.

Erlang Version

The erlsha2 app requires Erlang R14B or later.

erlsha2's People

Contributors

vinoski avatar jflatow avatar yrashk avatar

Watchers

James Cloos avatar Maximilian Merz 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.