/* goodG2B() - use goodsource and badsink */ private static void GoodG2B() { data = ""; /* Initialize data */ /* read user input from console with readLine */ try { /* FIX: Read data from the console using readLine() */ data = Console.ReadLine(); } catch (IOException exceptIO) { IO.Logger.Log(NLog.LogLevel.Warn, "Error with stream reading", exceptIO); } CWE321_Hard_Coded_Cryptographic_Key__basic_68b.GoodG2BSink(); }
public override void Bad() { /* FLAW: Set data to a hardcoded value */ data = "23 ~j;asn!@#/>as"; CWE321_Hard_Coded_Cryptographic_Key__basic_68b.BadSink(); }