public async Task <RSAKeyIdentity> FlushRSAKey() { var rsaKey = RSAHelper.GenerateRSASecretKey(); var identity = Guid.NewGuid().ToString(); var key = RedisKeyGenerator.Concat(RSAKey, identity); await database.StringSetAsync(key, rsaKey.PrivateKey, RSAKeyCacheTime); return(new RSAKeyIdentity { Key = rsaKey.PublicKey, Identity = identity }); }