Latest 0.2
Homepage https://github.com/wolfmcnally/LifeHash
License MIT
Platforms ios 9.3, osx 10.13, tvos 11.0
Dependencies WolfFoundation, WolfColor, WolfNumerics, WolfImage, WolfGeometry
Authors

CI Status
Version
License
Platform

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 16×16 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.

Samples of LifeHash Samples of LifeHash

Samples of LifeHash Samples of LifeHash

Samples of LifeHash Samples of LifeHash

Samples of LifeHash Samples of LifeHash

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Swift 4.2

Installation

LifeHash is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'LifeHash'

Author

Wolf McNally, [email protected]

License

LifeHash is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "LifeHash",
    "version": "0.2",
    "summary": "A beautiful method of hash visualization based on Conwayu2019s Game of Life.",
    "description": "A method of hash visualization based on Conwayu2019s Game of Life that creates beautiful icons that are deterministic, yet distinct and unique given the input data.",
    "homepage": "https://github.com/wolfmcnally/LifeHash",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Wolf McNally": "[email protected]"
    },
    "source": {
        "git": "https://github.com/wolfmcnally/LifeHash.git",
        "tag": "0.2"
    },
    "pod_target_xcconfig": {
        "SWIFT_OPTIMIZATION_LEVEL": "-O",
        "SWIFT_COMPILATION_MODE": "wholemodule",
        "ARCHS": "$(ARCHS_STANDARD)",
        "ONLY_ACTIVE_ARCH": "NO"
    },
    "source_files": "LifeHash/Classes/**/*",
    "swift_version": "4.2",
    "platforms": {
        "ios": "9.3",
        "osx": "10.13",
        "tvos": "11.0"
    },
    "module_name": "LifeHash",
    "dependencies": {
        "WolfFoundation": [],
        "WolfColor": [],
        "WolfNumerics": [],
        "WolfImage": [],
        "WolfGeometry": []
    }
}

Pin It on Pinterest

Share This