예제 #1
0
        public void ShouldNotMatchStrings()
        {
            // Arrange
            string str = "Test String";
            BCryptEncryptor encryptor = new BCryptEncryptor();

            // Act
            string strEncrypted = encryptor.Encrypt(str);

            // Assert
            Assert.IsFalse(encryptor.IsMatch("testing", strEncrypted));
        }
예제 #2
0
        public void ShouldHashString()
        {
            // Arrange
            string str = "Test String";
            BCryptEncryptor encryptor = new BCryptEncryptor();

            // Act
            string strEncrypted = encryptor.Encrypt(str);

            // Assert
            Assert.AreNotEqual(strEncrypted, str);
        }