Exemple #1
0
        private JsonWebKey GenerateRsa()
        {
            var key = CryptoService.CreateRsaSecurityKey();

            return(JsonWebKeyConverter.ConvertFromRSASecurityKey(key));
        }
Exemple #2
0
        private JsonWebKey GenerateAES(Algorithm jwsAlgorithms)
        {
            var key = CryptoService.CreateAESSecurityKey(jwsAlgorithms);

            return(JsonWebKeyConverter.ConvertFromSymmetricSecurityKey(new SymmetricSecurityKey(key.Key)));
        }