Skip to main content

encode_rs256

Function encode_rs256 

Source
pub fn encode_rs256<H, C>(
    header: &H,
    claims: &C,
    private_key: &RsaPrivateKey,
) -> Result<String>
where H: Serialize, C: Serialize,
Expand description

Encode a JWS compact JWT using the RS256 algorithm.

RS256 is RSA PKCS#1 v1.5 with SHA-256. The caller owns the JWT header and claims shape so service-specific fields such as x5t stay service-local.