Beispiel #1
0
        public void SanitizeHashTest()
        {
            RDHasher hasher = new RDHasher();
            string   hash   = "CKPPNAP-   NS   47 A s k 3 F  Ff";

            Assert.IsTrue(string.Equals(hasher.SanitizeHash(hash), "CKPPNAPNS47ASK3FFF", StringComparison.Ordinal));
        }
Beispiel #2
0
        public void ValidateHashTest()
        {
            RDHasher hasher = new RDHasher();

            string hash = hasher.ComputeHash("abcdefghijklmno 1234 77765 0987654321");

            Assert.IsTrue(hasher.ValidateHash(hash));
        }
Beispiel #3
0
        public void CompareHashesTest()
        {
            RDHasher hasher = new RDHasher();
            string   hash1  = "CKPPN-APNS-47ASK-3FFF";
            string   hash2  = "CKPPNAP-   NS   47 A s k 3 F  Ff";

            Assert.IsTrue(hasher.CompareHashes(hash1, hash2));
        }