public void GenerateKeys(string text, string password) { try { SecurityKeyGenerator securityKeyGenerator = new SecurityKeyGenerator(); var val = securityKeyGenerator.GenerateKeys(text, password); if (val == null) { Console.WriteLine("Error in Generating Key"); } int count = 0; foreach (var key in val) { Console.WriteLine($"Key {++count} : {key.Key}"); } Console.WriteLine(Environment.NewLine); } catch (Exception ex) { Console.WriteLine("Error in Encryption"); } }
public void GenerateKeys(string text, string password, out IEnumerable <SecurityKey> securityKeys) { SecurityKeyGenerator securityKeyGenerator = new SecurityKeyGenerator(); securityKeys = securityKeyGenerator.GenerateKeys(text, password); }