I have below function in c# for encryption.
public static string Encrypt(string str)
{
    string EncrptKey = "2013;[pnuLIT)WebCodeExpert";
    byte[] byKey = { };
    byte[] IV = { 18, 52, 86, 120, 144, 171, 205, 239 };
    byKey = System.Text.Encoding.UTF8.GetBytes(EncrptKey.Substring(0, 8));
    DESCryptoServiceProvider des = new DESCryptoServiceProvider();
    byte[] inputByteArray = Encoding.UTF8.GetBytes(str);
    MemoryStream ms = new MemoryStream();
    CryptoStream cs = new CryptoStream(ms, des.CreateEncryptor(byKey, IV), CryptoStreamMode.Write);
    cs.Write(inputByteArray, 0, inputByteArray.Length);
    cs.FlushFinalBlock();
    return Convert.ToBase64String(ms.ToArray());
}
I want to use same methodology in node.js for encryption. Any help would be appreciated.
