GithubHelp home page GithubHelp logo

isabella232 / ion-hash-test-driver Goto Github PK

View Code? Open in Web Editor NEW

This project forked from amazon-ion/ion-hash-test-driver

0.0 0.0 0.0 13 KB

A cross-implementation test driver for Amazon Ion Hash.

Home Page: https://amzn.github.io/ion-hash/

License: Apache License 2.0

Python 100.00%

ion-hash-test-driver's Introduction

Ion Hash Test Driver

A cross-implementation test driver for Amazon Ion Hash readers and writers.

Build Status

Usage

The Ion Hash Test Driver fetches copies of known Ion Hash implementations and executes each against a set of test data derived from ion-hash-test. It then generates a report indicating how consistent the implementations are when hashing the test data.

To execute the test driver:

$ python3 -m venv venv
$ . venv/bin/activate
$ pip install -r requirements.txt
$ pip install -e .
$ python ionhashtest/ion_hash_test_driver.py

Checking consistency of a new Ion Hash implementation

Additional Ion Hash implementations may be checked for consistency by adding information about the implementation to this project's config.py file, including the location of a command-line tool provided by the implementation. The ion-hash-test-driver invokes such command-line tools via command [algorithm] [filename], where [algorithm] is the name of the hash function to use when computing the Ion hashes, and [filename] is a file containing one or more top-level Ion values (note that a given file may be encoded as either Ion text or Ion binary). For each top-level value in the file, the command-line tool is expected to print a single line containing the computed Ion Hash as space-separated hexadecimal bytes.

For example, given a file ion_values.ion containing the following three top-level Ion text values:

$ion_1_0
hello
[1, 2, 3]
{
  a: 1,
  b: 2,
  c: [3, 4, 5],
}

an implementation's command-line utility executed as follows:

$ tools/ion-hash md5 ion_values.ion

should output:

2a 2a f7 b7 77 31 b0 ba 4c 2f 63 7d f1 82 96 35
8f 3b f4 b1 93 5c f4 69 c9 c1 0c 31 52 4b 26 25
5c 5e 20 42 f4 ea 70 9a 43 cb c5 f9 e4 79 a4 c0

See ion-hash-python's command-line tool as an example.

License

This project is licensed under the Apache 2.0 License.

ion-hash-test-driver's People

Contributors

amazon-auto avatar dependabot[bot] avatar popematt 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.