Esempio n. 1
0
        public new Podcast AddOrUpdate(Podcast podcast)
        {
            // hash the passwords
            if (podcast.AuthPassword == null || podcast.AuthPassword.Length == 0 || (!podcast.Private))
            {
                return(base.Update(podcast));
            }

            var salt     = PBKDFGenerators.GenerateSalt();
            var password = PBKDFGenerators.GenerateHash(podcast.AuthPassword, salt);

            podcast.AuthPasswordSalt = salt;
            podcast.AuthPassword     = password;

            return(base.Update(podcast));
        }
Esempio n. 2
0
        public static void Main(string[] args)
        {
            var salt = PBKDFGenerators.GenerateSalt();

            BuildWebHost(args).Run();
        }