Ejemplo n.º 1
0
        public void Init()
        {
            DES _newDes = DESEncryptor.CreateDES("yanzhiweizhuzhouhunanchina");

            _newDes.IV = new byte[8] {
                0x01, 0x02, 0x03, 0x4, 0x05, 0x06, 0x07, 0x08
            };
            desHelper = new DESEncryptor(_newDes.Key, _newDes.IV);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Create a new instance of Usuario application service
        /// </summary>
        /// <param name="repository">Repository dependency</param>
        public UsuarioAppService(IUsuarioRepository repository)
        {
            if (repository == null)
            {
                throw new ArgumentNullException("repository", ApplicationResources.exception_WithoutRepository);
            }
            _repositoryUsuario = repository;
            DES _newDes = DESEncryptor.CreateDES("WebApp.AppServices");

            _newDes.IV = new byte[8] {
                0x01, 0x02, 0x03, 0x4, 0x05, 0x06, 0x07, 0x08
            };
            desHelper = new DESEncryptor(_newDes.Key, _newDes.IV);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Create a new instance of Usuario controller
        /// </summary>
        /// <param name="service">Service dependency</param>
        /// <param name="serviceLoginAttempts">Service dependency</param>
        /// <param name="servicePermisosUsuario">Service dependency</param>
        /// <param name="serviceUserPasswords">Service dependency</param>
        /// <param name="serviceUserPhotos">Service dependency</param>
        public AccountController(IUsuarioAppService service, ILoginAttemptsAppService serviceLoginAttempts, IPermisosUsuarioAppService servicePermisosUsuario, IUserPasswordsAppService serviceUserPasswords, IUserPhotosAppService serviceUserPhotos, IPasswordAppService servicePassword, IUnitOfWorkAsync unitOfWork)
        {
            if (service == null)
            {
                throw new ArgumentNullException("service", PresentationResources.exception_WithoutService);
            }
            if (serviceLoginAttempts == null)
            {
                throw new ArgumentNullException("serviceLoginAttempts", PresentationResources.exception_WithoutService);
            }
            if (servicePermisosUsuario == null)
            {
                throw new ArgumentNullException("servicePermisosUsuario", PresentationResources.exception_WithoutService);
            }
            if (serviceUserPasswords == null)
            {
                throw new ArgumentNullException("serviceUserPasswords", PresentationResources.exception_WithoutService);
            }
            if (serviceUserPhotos == null)
            {
                throw new ArgumentNullException("serviceUserPhotos", PresentationResources.exception_WithoutService);
            }

            _serviceUsuario         = service;
            _serviceLoginAttempts   = serviceLoginAttempts;
            _servicePermisosUsuario = servicePermisosUsuario;
            _serviceUserPasswords   = serviceUserPasswords;
            _serviceUserPhotos      = serviceUserPhotos;
            _servicePassword        = servicePassword;
            _unitOfWork             = unitOfWork;
            DES _newDes = DESEncryptor.CreateDES("WebApp.AppServices");

            _newDes.IV = new byte[8] {
                0x01, 0x02, 0x03, 0x4, 0x05, 0x06, 0x07, 0x08
            };
            desHelper = new DESEncryptor(_newDes.Key, _newDes.IV);
        }