Example #1
0
        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;
            }
        }
Example #2
0
 public QueryController(V2RayDbContent db)
 {
     this.db = db;
 }