![]() |
||
---|---|---|
Art | ||
Example | ||
Sources/LifeHash | ||
.gitignore | ||
.travis.yml | ||
LICENSE | ||
Package.swift | ||
README.md |
README.md
LifeHash
A method of hash visualization based on Conway’s Game of Life that creates beautiful icons that are deterministic, yet distinct and unique given the input data.
The basic concept is to take a SHA256 hash of the input data (which can be any data including another hash) and then use the 256-bit digest as a 16x16 pixel "seed" for running the cellular automata known as Conway’s Game of Life.
After the pattern becomes stable (or begins repeating) the resulting history is used to compile a grayscale image of all the states from the first to last generation. Using Game of Life provides visual structure to the resulting image, even though it was seeded with entropy.
Some bits of the initial hash are then used to deterministically apply symmetry and color to the icon to add beauty and quick recognizability.
Example
To run the example project, clone the repo, and run pod install
from the Example directory first.
Installation
LifeHash is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'LifeHash'
Author
Wolf McNally, wolf@wolfmcnally.com
License
LifeHash is available under the MIT license. See the LICENSE file for more info.