captcha 1.0.0

Library for generating CAPTCHAs.
Documentation
1
2
3
4
5
6
7
8
9
10
11
extern crate captcha;

use captcha::{generate, Difficulty};
use std::fs::File;
use std::io::prelude::*;

fn main() -> std::io::Result<()> {
    let s = generate(Difficulty::Easy).as_base64().expect("Error.");
    let mut f = File::create("/tmp/captcha_base64.txt")?;
    f.write_all(s.as_bytes())
}