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