]> git.proxmox.com Git - mirror_edk2.git/blobdiff - AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_sha.py
edk2: Remove AppPkg, StdLib, StdLibPrivateInternalFiles
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.2 / Lib / test / test_sha.py
diff --git a/AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_sha.py b/AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_sha.py
deleted file mode 100644 (file)
index 50b48e0..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-# Testing sha module (NIST's Secure Hash Algorithm)\r
-\r
-# use the three examples from Federal Information Processing Standards\r
-# Publication 180-1, Secure Hash Standard,  1995 April 17\r
-# http://www.itl.nist.gov/div897/pubs/fip180-1.htm\r
-\r
-import warnings\r
-warnings.filterwarnings("ignore", "the sha module is deprecated.*",\r
-                        DeprecationWarning)\r
-\r
-import sha\r
-import unittest\r
-from test import test_support\r
-\r
-\r
-class SHATestCase(unittest.TestCase):\r
-    def check(self, data, digest):\r
-        # Check digest matches the expected value\r
-        obj = sha.new(data)\r
-        computed = obj.hexdigest()\r
-        self.assertTrue(computed == digest)\r
-\r
-        # Verify that the value doesn't change between two consecutive\r
-        # digest operations.\r
-        computed_again = obj.hexdigest()\r
-        self.assertTrue(computed == computed_again)\r
-\r
-        # Check hexdigest() output matches digest()'s output\r
-        digest = obj.digest()\r
-        hexd = ""\r
-        for c in digest:\r
-            hexd += '%02x' % ord(c)\r
-        self.assertTrue(computed == hexd)\r
-\r
-    def test_case_1(self):\r
-        self.check("abc",\r
-                   "a9993e364706816aba3e25717850c26c9cd0d89d")\r
-\r
-    def test_case_2(self):\r
-        self.check("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",\r
-                   "84983e441c3bd26ebaae4aa1f95129e5e54670f1")\r
-\r
-    def test_case_3(self):\r
-        self.check("a" * 1000000,\r
-                   "34aa973cd4c4daa4f61eeb2bdbad27316534016f")\r
-\r
-    def test_case_4(self):\r
-        self.check(chr(0xAA) * 80,\r
-                   '4ca0ef38f1794b28a8f8ee110ee79d48ce13be25')\r
-\r
-def test_main():\r
-    test_support.run_unittest(SHATestCase)\r
-\r
-\r
-if __name__ == "__main__":\r
-    test_main()\r