Code Explainers

Code explainers tagged #constant-time-compare

go
package middleware
 
import (
	"crypto/subtle"

Timing-safe API key auth in Gin

middleware authentication constant-time-compare
Intermediate 8 steps
go
package middleware
 
import (
	"crypto/hmac"

Verifying signed URLs with Gin middleware

hmac middleware authentication
Intermediate 8 steps
rust
use axum::{
    extract::{FromRequestParts, Path, Query},
    http::{request::Parts, StatusCode},
    response::{IntoResponse, Redirect},

Signed download links as an Axum extractor

hmac custom-extractor authentication
Advanced 9 steps
go
package webhooks
 
import (
	"crypto/hmac"

Verifying GitHub webhooks in Gin

hmac webhooks middleware
Intermediate 6 steps