All Projects → ahf → hashvis

ahf / hashvis

Licence: BSD-2-Clause license
Rust Program for Deterministic Generation of Random Art.

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to hashvis

Hash Embeddings
PyTorch implementation of Hash Embeddings (NIPS 2017). Submission to the NIPS Implementation Challenge.
Stars: ✭ 126 (+193.02%)
Mutual labels:  hashing
Hashnet
Code release for "HashNet: Deep Learning to Hash by Continuation" (ICCV 2017)
Stars: ✭ 192 (+346.51%)
Mutual labels:  hashing
Merkletreejs
🌱 Construct Merkle Trees and verify proofs in JavaScript.
Stars: ✭ 238 (+453.49%)
Mutual labels:  hashing
Rollinghashcpp
Rolling Hash C++ Library
Stars: ✭ 141 (+227.91%)
Mutual labels:  hashing
Interviewbit
Collection of Abhishek Agrawal's gists solutions for problems on https://www.interviewbit.com
Stars: ✭ 166 (+286.05%)
Mutual labels:  hashing
Caffe Deepbinarycode
Supervised Semantics-preserving Deep Hashing (TPAMI18)
Stars: ✭ 206 (+379.07%)
Mutual labels:  hashing
Data Structures
Data-Structures using C++.
Stars: ✭ 121 (+181.4%)
Mutual labels:  hashing
randomgen
Numpy-compatible bit generators and add some random variate distributions missing from NumPy.
Stars: ✭ 82 (+90.7%)
Mutual labels:  rng
Shokoserver
Repository for Shoko Server.
Stars: ✭ 184 (+327.91%)
Mutual labels:  hashing
Libdict
C library of key-value data structures.
Stars: ✭ 234 (+444.19%)
Mutual labels:  hashing
Auth Adt
Authenticated Data Structures Generically
Stars: ✭ 150 (+248.84%)
Mutual labels:  hashing
Cyberchef
The Cyber Swiss Army Knife - a web app for encryption, encoding, compression and data analysis
Stars: ✭ 13,674 (+31700%)
Mutual labels:  hashing
Clhash
C library implementing the ridiculously fast CLHash hashing function
Stars: ✭ 220 (+411.63%)
Mutual labels:  hashing
Sketchy
Sketching Algorithms for Clojure (bloom filter, min-hash, hyper-loglog, count-min sketch)
Stars: ✭ 138 (+220.93%)
Mutual labels:  hashing
Argon2 Jvm
Argon2 Binding for the JVM
Stars: ✭ 245 (+469.77%)
Mutual labels:  hashing
Password4j
Password4j is a user-friendly cryptographic library that supports Argon2, Bcrypt, Scrypt, PBKDF2 and various cryptographic hash functions.
Stars: ✭ 124 (+188.37%)
Mutual labels:  hashing
Util
A collection of useful utility functions
Stars: ✭ 201 (+367.44%)
Mutual labels:  hashing
crc32c
Fast CRC-32-Castagnoli implementation in Rust
Stars: ✭ 26 (-39.53%)
Mutual labels:  hashing
Data-Structure-Algorithm-Programs
This Repo consists of Data structures and Algorithms
Stars: ✭ 464 (+979.07%)
Mutual labels:  hashing
Damiengkit
Useful utility classes and helpers from DamienG.com
Stars: ✭ 221 (+413.95%)
Mutual labels:  hashing

Hashvis Build Status

A Rust application for deterministic generation of images.

Hashvis is a small Rust application and library for generating very psychedelic images from an input string. The images are generated in a deterministic manner such that the same input string should always result in the same image being generated.

Hashvis is inspired by OpenSSH's VisualHostKey where the OpenSSH client will display a deterministic piece of ASCII art generated from the host keys when you are trying to authenticate with a remote server. The idea behind this feature is that humans have an easier way to remember visual impressions than long, hex-encoded, fingerprints.

Example usage could be:

  • OpenSSH host keys (like with VisualHostKey described above).
  • OpenPGP public key fingerprints.
  • Tor onion and next-generation onion public keys.

Currently Hashvis takes the user input string and passes it to the SHA3-256 hash function and uses this hash value to seed the ChaCha random number generator. The random number generator is then used to generate a lot of 64-bit floating-point values that are used to generate the expressions that is finally used to plot the RGB image.

Building Hashvis

To download and build Hashvis:

$ git clone https://github.com/ahf/hashvis.git
$ cd hashvis
$ cargo build

You can try running the application using:

$ cargo run --bin hashvis misc/examples/yourusername.png yourusername 256
    Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
     Running `target/debug/hashvis misc/examples/yourusername.png yourusername`
Generating image with SHA3("yourusername") in misc/examples/yourusername.png ...
R: f(x, y) = cos(pi * sin(pi * cos(pi * tan(pi * sin(pi * sin(pi * y) * y)) * y)))
G: f(x, y) = tan(pi * tan(pi * cos(pi * x * tan(pi * y) * x * x)) * tan(pi * sin(pi * sin(pi * x) * sin(pi * y))))
B: f(x, y) = tan(pi * x)

Feel free to submit a pull request if you think your generated image looks spectacular.

Testing Hashvis

To run the minimal test suite:

$ cargo test

Zooming In and Out

The factor argument that the Hashvis binary takes as an input allows you to zoom in and out. A value smaller than 1.0 will zoom in, and anything larger than 1.0 will zoom out of the normal view port. The default value is 1.0.

31512-1 31512-4

Authors

Interactive Twitter Bot

Matthew Garrett (@mjg59) wrote a very cool interactive Twitter bot which fetches your Github SSH Public Key and executes Hashvis on the first key and tweets out the generated picture.

You can write your Github username to the bot and it will tweet out your, hopefully very unique, picture.

Check out the bot at https://twitter.com/github_idbot

Gallery

ahf Foobar 1369

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].