//----------------------------------------------------------------------- // // EncryptionFactory belongs to Copyright (c) Origtek. All rights reserved. // //----------------------------------------------------------------------- namespace OT.COM.Encryption { using OT.COM.LogisticsUtil; using System; /// /// Encryption Factory /// public partial class EncryptionFactory { /// /// For choose encryption type /// public enum EncryptionType { /// /// AES algorithm /// ET_AES = 0, /// /// DES algorithm /// ET_DES = 1, /// /// Triple DES algorithm /// ET_TripleDES = 2 } /// /// Factory entry /// /// /// Encryption type /// /// /// Created AEncryption object /// public AEncryption GetInstance(EncryptionType i_et) { string sName = Enum.GetName(typeof(EncryptionType), i_et); object oRes = null; ClassHelper.GetInstByClassName(sName.Substring(3), out oRes); return (oRes == null) ? null : oRes as AEncryption; } } }