salvo-csrf
Salvo CSRF Protection
[dependencies]
salvo = { version = "0.89.3", features = ["csrf"] }
Ciphers
| Function prefix | Key type | Notes |
|---|---|---|
bcrypt_* |
— | No key. Slowest (bcrypt hashing). |
hmac_* |
[u8; 32] |
Fast. |
aes_gcm_* |
[u8; 32] |
Authenticated encryption. |
ccp_* |
[u8; 32] |
ChaCha20Poly1305. |
Each cipher pairs with a store: *_cookie_csrf(...) or *_session_csrf(...). Session variants require a SessionHandler installed earlier in the chain.
Basic: Cookie Store + Form Token
More from salvo-rs/salvo-skills
salvo-realtime
Implement real-time features using WebSocket and Server-Sent Events (SSE). Use for chat applications, live updates, notifications, and bidirectional communication.
17salvo-auth
Implement authentication and authorization using JWT, Basic Auth, or custom schemes. Use for securing API endpoints and user management.
16salvo-websocket
Implement WebSocket connections for real-time bidirectional communication. Use for chat, live updates, gaming, and collaborative features.
16salvo-proxy
Implement reverse proxy to forward requests to backend services. Use for load balancing, API gateways, and microservices routing.
16salvo-cors
Configure Cross-Origin Resource Sharing (CORS) and security headers. Use for APIs accessed from browsers on different domains.
16salvo-database
Integrate databases with Salvo using SQLx, Diesel, SeaORM, or other ORMs. Use for persistent data storage and database operations.
16