/// <summary>JwkToProvider</summary> /// <param name="jwkObject">JObject</param> /// <returns>RSA(公開鍵)</returns> public static RSA JwkToProvider(JObject jwkObject) { RSAParameters rsaParameters = RsaPublicKeyConverter.JwkToParam(jwkObject); RSA rsa = AsymmetricAlgorithmCmnFunc.RsaFactory(); rsa.ImportParameters(rsaParameters); return(rsa); }
/// <summary>JwkToParam</summary> /// <param name="jwkString">string</param> /// <returns>RSAParameters(公開鍵)</returns> public static RSAParameters JwkToParam(string jwkString) { return(RsaPublicKeyConverter.JwkToParam( JsonConvert.DeserializeObject <JObject>(jwkString))); }