public static void GenerateRandomPassphrase(int length) { if (length >= 4 && length <= 20) { char[] passphrase = PasswordGenerator.GenerateRandomPassphrase(length, true, true); Console.WriteLine(passphrase); Utilities.ZeroArray(passphrase); } else { Console.WriteLine("Error: Invalid number of words. Randomly generated passphrases must be between 4-20 words."); } }
public static void GenerateRandomPassword(int length) { if (length >= 8 && length <= 128) { char[] password = PasswordGenerator.GenerateRandomPassword(length, true, true, true, true); Console.WriteLine(password); Utilities.ZeroArray(password); } else { Console.WriteLine("Error: Invalid length. Randomly generated passwords must be between 8-128 characters."); } }