Ejemplo n.º 1
0
        public KMSGetter()
        {
            this.hexConverter = new HexConverter();
            this.byteWorker = new ByteWorker();
            this.symCryptor = new SymCryptor();
            if (dicKmsLoginConfig == null)
            {
                LoadXmlConfig(@"EsKmsWebApiConfig.xml");
            }
            this.esKmsWebApi = new EsKmsWebApi()
            {
                Url = dicKmsLoginConfig["Url"],
                //"http://10.27.68.163:8080/eGATEsKMS/interface",
                //"http://127.0.0.1:8081/eGATEsKMS/interface",
                AppCode = dicKmsLoginConfig["AppCode"],
                //"APP_001",
                AuthCode = dicKmsLoginConfig["AuthCode"],
                //"12345678",
                AppName = dicKmsLoginConfig["AppName"],
                //"icash2Test",
                HttpMethod = dicKmsLoginConfig["HttpMethod"],
                //"POST",
                HexConverter = new HexConverter(),
                HashWorker = new HashWorker()
                {
                    HashAlg = "SHA1",
                    HexConverter = new HexConverter()
                }
            };

            this.aesCMac2Worker = new AesCMac2Worker(this.esKmsWebApi);
        }
Ejemplo n.º 2
0
        public iBonAuthenticate()
        {
            this.hexConverter = new HexConverter();
            this.byteWorker = new ByteWorker();
            this.symCryptor = new SymCryptor();
            this.RandomACreater = new SessionKeyGenerator();
            this.GenerateRanAIndex = new Random(Guid.NewGuid().GetHashCode());
            if (dicKmsLoginConfig == null)
            {
                LoadXmlConfig(@"EsKmsWebApiConfig.xml");
            }
            this.esKmsWebApi = new EsKmsWebApi()
            {
                Url = dicKmsLoginConfig["Url"],
                //"http://10.27.68.163:8080/eGATEsKMS/interface",
                //"http://127.0.0.1:8081/eGATEsKMS/interface",
                AppCode = dicKmsLoginConfig["AppCode"],
                //"APP_001",
                AuthCode = dicKmsLoginConfig["AuthCode"],
                //"12345678",
                AppName = dicKmsLoginConfig["AppName"],
                //"icash2Test",
                HttpMethod = dicKmsLoginConfig["HttpMethod"],
                //"POST",
                HexConverter = new HexConverter(),
                HashWorker = new HashWorker()
                {
                    HashAlg = "SHA1",
                    HexConverter = new HexConverter()
                }
            };

            this.aesCMac2Worker = new AesCMac2Worker(this.esKmsWebApi);
        }
Ejemplo n.º 3
0
 public void Init()
 {
     this.hexConverter = new HexConverter();
     this._AesCMac2Worker = new AesCMac2Worker();
 }