public DataRevController( IConfiguration configuration, IAsymmetric asymmetric, ISymmetric symmetric, V2RayDbContent db) { this.configuration = configuration; this.symmetric = symmetric; this.asymmetric = asymmetric; this.db = db; string key = configuration.GetValue <string>("KeyFile"); using (TextReader reader = System.IO.File.OpenText(key)) { PemReader pem = new PemReader(reader); AsymmetricCipherKeyPair pair = (AsymmetricCipherKeyPair)pem.ReadObject(); this.key = pair.Private; } }
public QueryController(V2RayDbContent db) { this.db = db; }