{
    "componentChunkName": "component---src-templates-note-note-js",
    "path": "/notes/hash",
    "result": {"data":{"mdx":{"body":"var _excluded = [\"components\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n/* @jsxRuntime classic */\n/* @jsx mdx */\n\nvar _frontmatter = {};\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n    props = _objectWithoutProperties(_ref, _excluded);\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"p\", null, \"hash is \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"/notes/good-enough\",\n    \"title\": \"good enough\"\n  }, \"good enough\"), \" in most scenarios.\"), mdx(\"p\", null, \"hash generally generates numbers from keys or strings. \"), mdx(\"h2\", null, \"types of hash\"), mdx(\"p\", null, \"There are several types of hash functions used in computer science and cryptography. Here are some of the main categories and examples:\"), mdx(\"h2\", null, \"Cryptographic Hash Functions\"), mdx(\"p\", null, \"These are designed to be secure and resistant to attacks:\"), mdx(\"p\", null, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"SHA (Secure Hash Algorithm) Family\")), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"\", mdx(\"a\", {\n    parentName: \"li\",\n    \"href\": \"/notes/SHA-1\",\n    \"title\": \"SHA-1\"\n  }, \"SHA-1\"), \" (160 bits, now considered insecure)\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"\", mdx(\"a\", {\n    parentName: \"li\",\n    \"href\": \"/notes/SHA-2\",\n    \"title\": \"SHA-2\"\n  }, \"SHA-2\"), \" (includes SHA-256 and SHA-512)\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"\", mdx(\"a\", {\n    parentName: \"li\",\n    \"href\": \"/notes/SHA-3\",\n    \"title\": \"SHA-3\"\n  }, \"SHA-3\"), \" (newest member of the SHA family)\", \"[1]\")), mdx(\"p\", null, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"MD (Message Digest) Family\")), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"\", mdx(\"a\", {\n    parentName: \"li\",\n    \"href\": \"/notes/MD5\",\n    \"title\": \"MD5\"\n  }, \"MD5\"), \" (128 bits, no longer considered secure for cryptographic purposes)\", \"[1]\")), mdx(\"p\", null, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Other Cryptographic Hashes\")), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"RIPEMD-160 (160 bits, considered secure)\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Whirlpool (512 bits, based on AES encryption)\", \"[4]\")), mdx(\"h2\", null, \"Non-Cryptographic Hash Functions\"), mdx(\"p\", null, \"These are designed for speed and efficiency in general-purpose computing:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"\", mdx(\"a\", {\n    parentName: \"li\",\n    \"href\": \"/notes/MurmurHash\",\n    \"title\": \"MurmurHash\"\n  }, \"MurmurHash\"), \"\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"\", mdx(\"a\", {\n    parentName: \"li\",\n    \"href\": \"/notes/FNV\",\n    \"title\": \"FNV\"\n  }, \"FNV\"), \" (Fowler\\u2013Noll\\u2013Vo)\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"CityHash\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"xxHash\", \"[3]\")), mdx(\"h2\", null, \"Checksums and Cyclic Redundancy Checks (CRCs)\"), mdx(\"p\", null, \"Used for error detection:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"CRC-32\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Adler-32\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Fletcher's checksum\", \"[3]\")), mdx(\"h2\", null, \"Special-Purpose Hash Functions\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Perceptual hashing (\", mdx(\"a\", {\n    parentName: \"li\",\n    \"href\": \"/notes/pHash\",\n    \"title\": \"pHash\"\n  }, \"pHash\"), \") - for finding similar multimedia files\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Locality-sensitive hashing - for finding similar items in large datasets\", \"[3]\")), mdx(\"h2\", null, \"Hash Function Methods\"), mdx(\"p\", null, \"These are techniques used to create hash functions:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Division Method\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Multiplication Method\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Mid-Square Method\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Folding Method\", \"[5]\")), mdx(\"p\", null, \"When choosing a hash function, consider factors like security requirements, speed, and the specific use case. For cryptographic purposes, SHA-256 or SHA-3 are generally recommended. For non-cryptographic uses like hash tables, faster algorithms like MurmurHash or xxHash may be more appropriate\", \"[1][4]\", \".\"), mdx(\"p\", null, \"\", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"/notes/Citations\",\n    \"title\": \"Citations\"\n  }, \"Citations\"), \":\\n\", \"[1]\", \" \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://www.scholarhat.com/tutorial/datastructures/hashing-in-data-structures\"\n  }, \"https://www.scholarhat.com/tutorial/datastructures/hashing-in-data-structures\"), \"\\n\", \"[2]\", \" \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://www.sciencedirect.com/topics/computer-science/hashing-algorithm\"\n  }, \"https://www.sciencedirect.com/topics/computer-science/hashing-algorithm\"), \"\\n\", \"[3]\", \" \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://en.wikipedia.org/wiki/List_of_hash_functions\"\n  }, \"https://en.wikipedia.org/wiki/List_of_hash_functions\"), \"\\n\", \"[4]\", \" \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://www.okta.com/identity-101/hashing-algorithms/\"\n  }, \"https://www.okta.com/identity-101/hashing-algorithms/\"), \"\\n\", \"[5]\", \" \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://www.geeksforgeeks.org/hash-functions-and-list-types-of-hash-functions/\"\n  }, \"https://www.geeksforgeeks.org/hash-functions-and-list-types-of-hash-functions/\"), \"\\n\", \"[6]\", \" \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://www.appsealing.com/hashing-algorithms/\"\n  }, \"https://www.appsealing.com/hashing-algorithms/\"), \"\\n\", \"[7]\", \" \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://www.2brightsparks.com/resources/articles/introduction-to-hashing-and-its-uses.html\"\n  }, \"https://www.2brightsparks.com/resources/articles/introduction-to-hashing-and-its-uses.html\"), \"\\n\", \"[8]\", \" \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://www.ibm.com/docs/en/i/7.4?topic=sf-hash-md5-hash-sha1-hash-sha256-hash-sha512\"\n  }, \"https://www.ibm.com/docs/en/i/7.4?topic=sf-hash-md5-hash-sha1-hash-sha256-hash-sha512\")));\n}\n;\nMDXContent.isMDXComponent = true;","inboundReferences":[]}},"pageContext":{"slug":"hash","node":{"childMdx":{"slug":"hash"}}}},
    "staticQueryHashes": []}