Skip to main content

Crate ancaptcha

Crate ancaptcha 

Source
Expand description

anCaptcha: A No-JS, stateless captcha engine implemented in Rust for cross-language integration.

Originally designed for the darknet, specifically for Tor hidden services, to provide human verification without requiring JavaScript. It uses authenticated encryption (ChaCha20-Poly1305) to store challenge state in tokens, eliminating the need for server-side sessions.

(c) 2026 Maverick. Licensed under Apache License, Version 2.0.

Re-exports§

pub use common::assets;
pub use common::error::AnCaptchaError;
pub use common::error::Result;
pub use config::CaptchaStyle;
pub use config::Config;
pub use config::Difficulty;
pub use config::Layout;
pub use config::NoiseIntensity;
pub use config::Theme;
pub use crypto::token::DEFAULT_TTL_SECONDS;
pub use engine::CaptchaRequest;
pub use engine::generate_full_captcha;
pub use storage::AssetCache;
pub use storage::get_cache;
pub use storage::init_cache;
pub use storage::init_with_intensity;
pub use verification::AnCaptcha;
pub use verification::CaptchaBundle;
pub use verification::PairSubmission;
pub use verification::RotateSubmission;
pub use verification::SliderSubmission;
pub use verification::generate_pair_bundle;
pub use verification::generate_rotate_bundle;
pub use verification::generate_slider_bundle;
pub use verification::verify_pair;
pub use verification::verify_rotate;
pub use verification::verify_slider;

Modules§

common
Shared utilities for encoding, randomization, and type definitions.
config
Engine configuration and settings coordination.
crypto
Cryptographic operations for secure token management.
engine
Visual asset distortion and HTML/CSS generation engine.
storage
Thread-safe singleton for asset variation caching.
styles
Challenge-specific validation and solution checking logic.
verification
Submission handling and verification coordination.