Exemplo n.º 1
0
        private void InitializeRSA()
        {
            RSA publicRSA = publicRSA = RSA.Create();

            publicRSA.ImportParameters(publicKey.GetParameters());
            securityKey = new RsaSecurityKey(publicRSA);

            RSA privateRSA = RSA.Create();

            privateRSA.ImportParameters(privateKey.GetParameters());
            var securityKeyRSA = new RsaSecurityKey(privateRSA);

            signingCredentials = new SigningCredentials(securityKeyRSA, SecurityAlgorithms.RsaSha256);
        }