예제 #1
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);
        }
예제 #2
0
 public SessionKeyManager(IOptions <NCacheSessionConfiguration> options, IDataProtectionProvider dataProtectionProvider, ISessionKeyGenerator generator)
 {
     _options       = options;
     _generator     = generator;
     _dataProtector = dataProtectionProvider.CreateProtector(nameof(SessionKeyManager));
 }
 public void Init()
 {
     this.sessionKeyGenerator = new SessionKeyGenerator();
     this.RanAStartIndex = 11;
 }