public WorkerService(IWorkerQuery workerQuery, IWorkerRepository workerRepository, IWorkerValidator workerValidator, IHmacHelper hmacHelper, IWorkerFactory workerFactory)
 {
     _workerQuery      = workerQuery;
     _workerRepository = workerRepository;
     _workerValidator  = workerValidator;
     _hmacHelper       = hmacHelper;
     _workerFactory    = workerFactory;
 }
Пример #2
0
 public UserService(IUserQuery userQuery, IUserRepository userRepository, IUserValidator userValidator, IHmacHelper hmacHelper, IUserFactory userFactory)
 {
     _userQuery      = userQuery;
     _userRepository = userRepository;
     _userValidator  = userValidator;
     _hmacHelper     = hmacHelper;
     _userFactory    = userFactory;
 }
        public void Setup()
        {
            _rng = new PredictableNumberGenerator(0x05);
            _hmac = new Mock<IHmacHelper>().Object;
            Mock.Get(_hmac).Setup(h => h.CalculateMac(It.IsAny<byte[]>(), It.IsAny<byte[]>())).Returns(GetMockMac);

            var config = new SessionSecurityConfigurationSection();
            config.SessionIDAuthentication.Enabled = true;
            config.SessionIDAuthentication.AuthenticationKey = "0101010101010101010101010101010101010101010101010101010101010101";

            _helper = new AuthenticatedSessionIDHelper(_rng, new byte[32], _hmac);
        }
Пример #4
0
        public void Setup()
        {
            _rng  = new PredictableNumberGenerator(0x05);
            _hmac = new Mock <IHmacHelper>().Object;
            Mock.Get(_hmac).Setup(h => h.CalculateMac(It.IsAny <byte[]>(), It.IsAny <byte[]>())).Returns(GetMockMac);

            var config = new SessionSecurityConfigurationSection();

            config.SessionIDAuthentication.Enabled           = true;
            config.SessionIDAuthentication.AuthenticationKey = "0101010101010101010101010101010101010101010101010101010101010101";

            _helper = new AuthenticatedSessionIDHelper(_rng, new byte[32], _hmac);
        }
 public AuditEventListener(IHmacHelper hmacHelper)
 {
     _hmacHelper = hmacHelper;
 }
Пример #6
0
 internal AuthenticatedSessionIDHelper(RandomNumberGenerator rng, byte[] key, IHmacHelper hmac)
 {
     this._rng  = rng;
     this._key  = key;
     this._hmac = hmac;
 }
 internal AuthenticatedSessionIDHelper(RandomNumberGenerator rng, byte[] key, IHmacHelper hmac)
 {
     this._rng = rng;
     this._key = key;
     this._hmac = hmac;
 }