Skip to content

MIM is a Hash Visualization format utilising 4x4 colour matrixes. This provides a quick and easy method to compare fingerprints, e.g. SSH keys, x509 certs etc.

License

Notifications You must be signed in to change notification settings

go-compile/mim-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MIM-RS (Minimal Identity Mozaic)

Version License

A rusty implementation.

MIM is a Hash Visualization algorithm utilising 4x4 colour matrixes. This provides a quick and easy method to compare fingerprints, e.g. SSH keys, x509 certs etc.

[ Go Implementation ] [ Rust Implementation ]

Properties

  • Pre Image Resistant
  • Fixed Length Output
  • Collision Resistant
  • Fast & Efficient
  • Identical Colours Cross Platform

Output

MIM outputs coloured ANSI escape codes.

Mim Rust Image

Example

use mim::{Mozaic};
use sha2::{Sha256,Digest};
use hex;

fn main() {
	// create the fingerprint in the typical way
	let mut hasher = Sha256::new();
    hasher.update("certificate contents would typically go here");
    let fingerprint = hasher.finalize();

	// provide the fingerprint to MIM
    let moz = Mozaic::new(&fingerprint);

	// print fingerprint
    println!("Fingerprint: {}", hex::encode(&fingerprint));

	// print Mozaic as ASNI
    println!("\n{}", &moz.ansi());
}

Install

[dependencies]
mim = "0.1.0"

About

MIM is a Hash Visualization format utilising 4x4 colour matrixes. This provides a quick and easy method to compare fingerprints, e.g. SSH keys, x509 certs etc.

Topics

Resources

License

Stars

Watchers

Forks

Languages