mirror of
https://github.com/RoboSats/robo-identities.git
synced 2026-01-30 01:42:14 +00:00
25 lines
546 B
Rust
25 lines
546 B
Rust
use robohash::*;
|
|
use std::error::Error;
|
|
use std::fs::File;
|
|
use std::io::Write;
|
|
|
|
fn main() -> Result<(), Box<dyn Error>> {
|
|
let initial_string = "reckless";
|
|
let size = 256;
|
|
|
|
// build
|
|
let robo_hash: RoboHash = RoboHashBuilder::new(initial_string)
|
|
.with_background(&true)
|
|
.with_size(size, size)
|
|
.build()
|
|
.unwrap();
|
|
|
|
let base64_robohash = robo_hash.assemble_base64()?;
|
|
|
|
// Save output
|
|
let mut output = File::create("robohash.txt")?;
|
|
write!(output, "{}", base64_robohash)?;
|
|
|
|
Ok(())
|
|
}
|