Giter Club home page Giter Club logo

ruby-scrypt's Introduction

ruby-scrypt

Litecoin Scrypt hashing function for Ruby.

Usage :

require 'scrypt'

# Litecoin block #526291
block_header_hex = "02000000" + "b73417169f9055d2a9e143faa078e0cf97a13c40a5fc117a6b85a2240e5a7d1a" + "dc39618a259aa142f2c01e3640f19a68848a7494e75f22a4f068e24ae5a4d8b1" + "b1e51853" + "0eb6101b" + "003a269b"
Scrypt.hash_hex( block_header_hex )
# => "000000000003f406a8163444623935c2c4320a7d5508773b3c2de8fee4b14068"

block_header_bin = [block_header_hex].pack("H*")
Scrypt.hash_bin( block_header_bin )
# => "\x00\x00\x00\x00\x00\x03\xF4\x06\xA8\x164Db95\xC2\xC42\n}U\bw;<-\xE8\xFE\xE4\xB1@h"

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.