Beispiel #1
0
        public void Crypt()
        {
            string Salt = "ohGPRtQpvRYcKscrFntAFBXQ9xIhiLtHlyRg81Hg2sUe4IcbV74zo3dNuuCzZdtIzWiBPakP9QR6hP+OHV/DTw==";
            var cryptoProvider = new DefaultCryptoProvider("RnObFfS6tQKWfHJmwCC1yGLtl/1T3oP+FGMZOyr77us=", "JOgQUaVye+6qoThNrqZDjA==");

            string passwordHash = cryptoProvider.GetHash("123456", Salt);
        }
Beispiel #2
0
        public static void Configure()
        {
            var container = new Container();

            container.RegisterPerWebRequest<ChanContext>();

            var cryptoProvider = new DefaultCryptoProvider("RnObFfS6tQKWfHJmwCC1yGLtl/1T3oP+FGMZOyr77us=", "JOgQUaVye+6qoThNrqZDjA==");
            container.RegisterSingleton(typeof(ICryptoProvider), () => cryptoProvider);

            DependencyResolver.SetResolver(new SimpleInjectorDependencyResolver(container));
        }