예제 #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));
        }
예제 #2
0
        public static void Main(string[] args)
        {
            var salt = PBKDFGenerators.GenerateSalt();

            BuildWebHost(args).Run();
        }