Code Explainers
Code explainers tagged #constant-time-comparison
ruby
require "openssl" require "base32" class TOTP
How TOTP one-time codes work in Ruby
hmac
authentication
totp
Intermediate
7 steps
rust
use axum::{ body::Body, extract::Request, http::{header, StatusCode},
A CSRF verification middleware in Axum
csrf
middleware
security
Intermediate
10 steps
java
package com.example.security; import javax.crypto.SecretKeyFactory; import javax.crypto.spec.PBEKeySpec;
Salted password hashing with PBKDF2 in Java
password-hashing
pbkdf2
salting
Intermediate
7 steps
go
package middleware import ( "bytes"
Verifying webhook HMAC signatures in Gin
hmac
middleware
webhooks
Intermediate
7 steps
rust
use axum::{ body::Bytes, extract::State, http::{HeaderMap, StatusCode},
Verifying Stripe webhook signatures in Axum
hmac
webhooks
constant-time-comparison
Intermediate
8 steps