Skip to main content

MIN_HS256_SECRET_LEN

Constant MIN_HS256_SECRET_LEN 

Source
pub const MIN_HS256_SECRET_LEN: usize = 32 /* 32usize */;
Available on crate feature auth-jwt only.
Expand description

The shortest HS256 secret JwtValidator accepts, in bytes.

RFC 7518 §3.2: “A key of the same size as the hash output (for instance, 256 bits for “HS256”) or larger MUST be used with this algorithm.“