File: decode.rs

package info (click to toggle)
rust-bs58 0.5.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 304 kB
  • sloc: makefile: 2
file content (10 lines) | stat: -rw-r--r-- 298 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
#![cfg(feature = "std")]
use std::io::{self, Read, Write};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let mut input = String::new();
    io::stdin().read_to_string(&mut input)?;
    let data = &bs58::decode(input.trim()).into_vec()?;
    io::stdout().write_all(data)?;
    Ok(())
}