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)); }
public static void Main(string[] args) { var salt = PBKDFGenerators.GenerateSalt(); BuildWebHost(args).Run(); }