public async Task PromptAsync(CancellationToken cancellationToken) { var selectedOption = await PromptSecretTypeAsync(cancellationToken); switch (selectedOption) { case 1: var secret = SecretGenerator.Generate(); Console.WriteLine($"Client Secret: {secret}"); Console.WriteLine(); var hashed256 = secret.Sha256(); var hashed512 = secret.Sha512(); Console.WriteLine("Your 256-bit hashed value is:"); Console.WriteLine(hashed256); Console.WriteLine("Your 512-bit hashed value is:"); Console.WriteLine(hashed512); Console.WriteLine(); break; case 2: var keys = RsaKeyPairGenerator.Generate(); Console.WriteLine("Private Key:"); Console.WriteLine(keys.PrivateKey); Console.WriteLine("Public Json Web Key:"); Console.WriteLine(keys.PublicKey); Console.WriteLine(); Console.WriteLine("Enter YES to write to file system:"); var writePromptResponse = Console.ReadLine(); if (writePromptResponse.Equals("YES", StringComparison.InvariantCultureIgnoreCase)) { await _writePrivateKeyPrompt.PromptAsync(keys.PrivateKey, cancellationToken); } break; } }