public CreateAuthService(IUserRepository userRepository, ICryptograph cryptograph, IOptions <CryptographConfig> cryptographConfig) { _userRepository = userRepository; _cryptograph = cryptograph; _jwtSecretKey = cryptographConfig.Value.JwtSecretKey; }
public CreateUserService(IUserRepository userRepository, ICryptograph cryptograph, IMapper mapper) { _userRepository = userRepository; _mapper = mapper; _cryptograph = cryptograph; }
public void TestCryptograph() { ICryptograph cryptograph = GetCryptograph(); string message = "test message 123?-;A0[]"; string encode = cryptograph.Encode(message); string decode = cryptograph.Decode(encode); Assert.IsTrue(message.Equals(decode)); }
/// <summary> /// Constructor /// </summary> /// <param name="repository">Repository to manage MIM Portal data</param> /// <param name="crypto">Cryptograph service</param> /// <param name="config">Configuration service</param> public MIMResourceAdminController( IResourceRepository repository, ICryptograph crypto, IConfiguration config) { this.repo = repository; this.cryptograph = crypto; this.configuration = config; this.encryptionKey = ConfigurationManager.GetValue <string>(this.configuration, "EncryptionKey", string.Empty); this.secretToken = this.cryptograph.Encrypt(this.encryptionKey, this.encryptionKey); }
/// <summary> /// Constructor /// </summary> /// <param name="config">Configuration service</param> /// <param name="crypto">Cryptograph service</param> public GeneralController(IConfiguration config, ICryptograph crypto) { this.configuration = config; this.cryptograph = crypto; }
public MIMResource(ICache cache, ISchema schema, ICryptograph crypto) { this.repoCache = cache; this.schema = schema; this.cryptograph = crypto; }
public CoreContext(DbContextOptions <CoreContext> options, ICryptograph cryptograph) : base(options) { _cryptograph = cryptograph; }