Code Monkey home page Code Monkey logo

digest-quickxor's Introduction

NAME

Digest::QuickXor - The QuickXorHash

SYNOPSIS

use Digest::QuickXor;

my $qx = Digest::QuickXor->new;

$qx->add(@data);
$qx->b64digest;

$qx->addfile($filehandle);
$qx->b64digest;

$qx->add($wrong_data);
$qx->reset;
$qx->add($correct_data);

# use as function
use Digest::QuickXor 'quickxorhash';

my $hash = quickxorhash(@data);

DESCRIPTION

Digest::QuickXor implements the QuickXorHash.

The QuickXorHash is the digest used by Microsoft on Office 365 OneDrive for Business and Sharepoint. It was published by Microsoft in 2016 in form of a C# script. The explanation describes it as a "quick, simple non-cryptographic hash algorithm that works by XORing the bytes in a circular-shifting fashion".

FUNCTIONS

None of the functions is exported by default.

quickxorhash

use Digest::QuickXor 'quickxorhash';

my $hash = quickxorhash(@data);

Returns the digest for the provided data.

CONSTRUCTOR

new

$qx = Digest::QuickXor->new;

METHODS

add

$qx = $qx->add($data);
$qx = $qx->add(@data);

Adds new blocks of data.

addfile

$qx = $qx->addfile($filehandle);

Adds data from a file handle.

b64digest

$string = $qx->b64digest;

Returns the digest and resets the object.

reset

$qx = $qx->reset;

Resets the object so it is ready to accept new data.

AUTHOR & COPYRIGHT

© 2019 by Tekki (Rolf Stöckli).

© for the original algorithm 2016 by Microsoft.

This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.

SEE ALSO

Explanation of the QuickXorHash Algorithm in the OneDrive Dev Center.

QuickXorHash.cs by Ryan Gregg.

quickxor-c, C implementation of the hash, base code for this module.

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.