Crates.io | biosvg |
lib.rs | biosvg |
version | 0.1.7 |
source | src |
created_at | 2023-08-28 14:42:10.680316 |
updated_at | 2024-11-08 17:56:00.412308 |
description | Captcha based on SVG. |
homepage | https://github.com/Reverier-Xu/biosvg |
repository | https://github.com/Reverier-Xu/biosvg |
max_upload_size | |
id | 957034 |
size | 62,253 |
Captcha based on SVG.
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);