namespace OubHackMS.OConsole.ConsoleCommands
{
    using OubHackMS.Core;
    using OubHackMS.Crypto;
    using OubHackMS.OConsole;
    using System;

    internal class Crypto : CommandPackage
    {
        public Crypto(OubHackMS parent) : base(parent)
        {
            base.dCommands["crypto/do_md5/"] = new Func<string, string[], bool>(this.commandDoMD5);
        }

        private bool commandDoMD5(string sCommand, string[] sArgs)
        {
            string str = "";
            for (int i = 0; i < sArgs.Length; i++)
            {
                str = str + sArgs[i] + " ";
            }
            Console.WriteLine(MD5L.sComputeHash(str.Substring(0, str.Length - 1)));
            return true;
        }
    }
}

