Exemplo n.º 1
0
 public void PasswordAndDifferentSalt_Crypt_ReturnsDifferentHash()
 {
     Sha512Util.Crypt("Hello world!", "$6$saltsdiffs").Should()
     .NotEndWith("svn8UoSVapNtMuq1ukKS4tPQd8iKwSMHWjl/O817G3uBnIFNjnQJuesI68u4OTLiBFdcbYEdFCoEOfaS35inz1",
                 "the salt has been changed");
 }
Exemplo n.º 2
0
 public void PasswordAndSalt_Crypt_ReturnsExpectedHash()
 {
     Sha512Util.Crypt("Hello world!", "$6$saltstring").Should()
     .Be("$6$saltstring$svn8UoSVapNtMuq1ukKS4tPQd8iKwSMHWjl/O817G3uBnIFNjnQJuesI68u4OTLiBFdcbYEdFCoEOfaS35inz1",
         "that's what the PHP test says");
 }