public JWS(RSA rsa) { this.rsa = rsa ?? throw new ArgumentNullException(nameof(rsa)); var publicParameters = rsa.ExportParameters(includePrivateParameters: false); this.jwk = new JWK { KeyType = "RSA", Exponent = publicParameters.Exponent.Base64UrlEncoded(), Modulus = publicParameters.Modulus.Base64UrlEncoded(), }; }
public JWSHeader(string algorithm, JWK key) { Algorithm = algorithm; Key = key; }