Hi all I have a c# code that i would like to convert to a perl script. can any one help? thanks this is the code:
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Security.Cryptography; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; public class Program { public static void Main() { var myString = "7512"; var o = CalculateMD5Hash(myString); Console.WriteLine("Generated String is: {0}", o); } public static string CalculateMD5Hash(string input) { HashAlgorithm ha = new MD5CryptoServiceProvider(); string prefix = "MD5:"; string password = ""; UnicodeEncoding enc = new UnicodeEncoding(); password = Convert.ToBase64String(ha.ComputeHash(enc.GetBytes( +input))); return prefix+password; } }
In reply to convert c# to perl code by ori smaug
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |