Ejemplo n.º 1
0
 static JsonWebKey CreateJWKey(
     RSAParameters publicKey,
     string algorithm,
     string keyId   = null,
     string keyType = "RSA") => new JsonWebKey
 {
     KeyType      = keyType,
     Algorithm    = algorithm,
     PublicKeyUse = KeyUse.Signature,
     Exponent     = publicKey.Exponent.ToBase64UrlSafe(),
     Modulus      = publicKey.Modulus.ToBase64UrlSafe(),
     KeyId        = keyId ?? publicKey.KeyId()
 };