biosvg

Crates.iobiosvg
lib.rsbiosvg
version0.1.7
sourcesrc
created_at2023-08-28 14:42:10.680316
updated_at2024-11-08 17:56:00.412308
descriptionCaptcha based on SVG.
homepagehttps://github.com/Reverier-Xu/biosvg
repositoryhttps://github.com/Reverier-Xu/biosvg
max_upload_size
id957034
size62,253
Reverier Xu (Reverier-Xu)

documentation

https://docs.rs/biosvg

README

BioSvg

Captcha based on SVG.

Original idea

SVG绘制原理与验证码

Usage

cargo add biosvg

let (answer, svg) = BiosvgBuilder::new()
    .length(4)
    .difficulty(6)
    .colors(vec![
        "#0078D6".to_string(),
        "#aa3333".to_string(),
        "#f08012".to_string(),
        "#33aa00".to_string(),
        "#aa33aa".to_string(),
    ])
    .build()
    .unwrap();
println!("answer: {}", answer);
println!("svg: {}", svg);

Example

ncuz wxgc

Commit count: 13

cargo fmt