{"id":13065,"date":"2016-06-06T12:15:55","date_gmt":"2016-06-06T09:15:55","guid":{"rendered":"https:\/\/www.webcodegeeks.com\/?p=13065"},"modified":"2016-06-02T22:07:48","modified_gmt":"2016-06-02T19:07:48","slug":"creating-hash-node-js","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/javascript\/node-js\/creating-hash-node-js\/","title":{"rendered":"Creating a hash in Node.js"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>We require hashes everywhere,\u00a0like setting\u00a0the password in database as hash instead of plain text password, to check whether if file is tampered or not during transmission or\u00a0checking integrity of file or messages transferred over network, etc.<\/p>\n<p>This small article will give detailed look at creating hash from Node.js core <code>crypto<\/code> module and later in the article, it shows how we can use the npm modules for same purpose.<\/p>\n<h2>Using Core Module<\/h2>\n<p>Node.js provides built-in core module <code>crypto<\/code> to do cryptography functionality. This core module provides the wrappers on OpenSSL functions.<\/p>\n<p>To\u00a0make use of these\u00a0crypto functions, you will need to keep in mind following-<\/p>\n<ul>\n<li>you will need to\u00a0have openssl installed on your machine. Many linux based machines has openssl installed by default.<\/li>\n<li>All functionality depends on version of OpenSSL installed as Node.js just provides wrapper functions on top of OpenSSL functions<\/li>\n<\/ul>\n<p>You can check for the which algorithms provided with following command \u2013<strong><code>openssl dgst -h<\/code><\/strong>, upon executing command you will get following-<\/p>\n<pre class=\"brush:bash\">$ openssl version\r\nOpenSSL 0.9.8zh 14 Jan 2016\r\n\r\n$ openssl dgst -h\r\nunknown option '-h'\r\noptions are\r\n-c              to output the digest with separating colons\r\n-d              to output debug info\r\n-hex            output as hex dump\r\n-binary         output in binary form\r\n-sign   file    sign digest using private key in file\r\n-verify file    verify a signature using public key in file\r\n-prverify file  verify a signature using private key in file\r\n-keyform arg    key file format (PEM or ENGINE)\r\n-signature file signature to verify\r\n-binary         output in binary form\r\n-hmac key       create hashed MAC with key\r\n-engine e       use engine e, possibly a hardware device.\r\n-md5            to use the md5 message digest algorithm (default)\r\n-md4            to use the md4 message digest algorithm\r\n-md2            to use the md2 message digest algorithm\r\n-sha1           to use the sha1 message digest algorithm\r\n-sha            to use the sha message digest algorithm\r\n-sha224         to use the sha224 message digest algorithm\r\n-sha256         to use the sha256 message digest algorithm\r\n-sha384         to use the sha384 message digest algorithm\r\n-sha512         to use the sha512 message digest algorithm\r\n-mdc2           to use the mdc2 message digest algorithm\r\n-ripemd160      to use the ripemd160 message digest algorithm<\/pre>\n<p>As you can see from above, from line 19 to line 29, it shows the algorithms available.<\/p>\n<p>So, basically, you can access functions such as\u00a0hash, hmac, ciper, decipher, sign, etc.<\/p>\n<p>For this article, we will make use of <code>hash<\/code> function and how we generate using Node.js <code>crypto<\/code> module.<\/p>\n<p>Following are steps \u2013<br \/>\n1. Load <code>crypto<\/code> module<br \/>\n2. Create the hash object with\u00a0specified algorithm<br \/>\n3. Set the data to be hashed, this can be string, file object, buffer object<br \/>\n4. Generate the hash in required format<\/p>\n<p>For creating the hash object we can use\u00a0following algorithms \u2013<br \/>\n\u2013 MD5 <a href=\"https:\/\/en.wikipedia.org\/wiki\/MD5\">(Message Digest 5)<\/a><br \/>\n\u2013 SHA1 <a href=\"https:\/\/en.wikipedia.org\/wiki\/SHA-1\">(Simple Hash Algorithm)<\/a><br \/>\n\u2013 SHA256 <a href=\"https:\/\/en.wikipedia.org\/wiki\/SHA-2\">(Simple Hash Algorithm -2 for 256 bits)<\/a><\/p>\n<p>Each algorithms has pros and cons and can be used according to need of application.<\/p>\n<p>Lets go from each and every stepes\u00a0of creating hash-<\/p>\n<p><strong>Step-1:<\/strong> Load\u00a0<code>crypto<\/code> module<\/p>\n<pre class=\"brush:perl\">var crypto = require(\u2018crypto\u2019)<\/pre>\n<p><strong>Step-2:\u00a0C<\/strong>reate <code>Hash<\/code> object from crypto<\/p>\n<pre class=\"brush:perl\">var hash = crypto.createHash([algorith-to-be-used])<\/pre>\n<p>Please note, how hash object is created with factory function\u00a0provided by the <code>cypto<\/code> variable and not to be created with <code>new<\/code> keyword.<br \/>\nFor creating the hash object, you need to provide the algorithm to be used, mostly following three are used <code>md5<\/code>, <code>sha1<\/code>, <code>sha256<\/code>. You can use any algorithm which your OpenSSL provides on your machine.<\/p>\n<pre class=\"brush:perl\">For e.g.\r\nvar hash = crypto.createHash(\u2018md5\u2019)\r\nvar hash = crypto.createHash(\u2018sha1\u2019)\r\nvar hash = crypto.createHash(\u2018sha256\u2019)<\/pre>\n<p><strong>Step-3:<\/strong> Set the data to be hashed<br \/>\nNow, on hash object, we need to set data to be hashed to which we have to generate hash. This can be string, file object, along with data we need to specify the encoding type for data, this usually <code>utf-8<\/code> or can be <code>binary<\/code>, <code>ascii<\/code><\/p>\n<p>For this, we need to use <code>update()<\/code> function on hash object,<\/p>\n<pre class=\"brush:perl\">hash.update([data to be hashed], [encoding-type] )\r\n\r\nFor.e.g\r\nhash_update = hash.update(\u2018my super secret data\u2019, \u2018utf-8\u2019)<\/pre>\n<p><strong>Step-4:<\/strong> Create the hash digest in required format<br \/>\nOnce we set the data to be hashed, now we can easliy create the has with <code>digest<\/code> funciton on the object which is return from <code>update()<\/code> call. This <code>digest<\/code> takes parameter which asks for in which format the hash to be generated, this can be <code>hex<\/code>. \u2026.<\/p>\n<pre class=\"brush:perl\">generated_hash= hash_update.digest([format])<\/pre>\n<p>After the above step, <code>generated_hash<\/code> variable will have the final hash on data provided and algorighm used.<\/p>\n<p><strong>tldr;<\/strong><\/p>\n<p>Now, above steps can be merged into the single chained calls, as follows, which makes code one-liner-<\/p>\n<pre class=\"brush:perl\">generated_hash = require(\u2018crypto\u2019)\r\n.createHash('md5')\r\n.update(\u2018my super secret data\u2019, 'utf8')\r\n.digest('hex')<\/pre>\n<p><strong>Generating hash for the file<\/strong><\/p>\n<p>For generating for file, we need to read\u00a0chunks of file stream data and create hash from that chunk accordingly.<\/p>\n<pre class=\"brush:perl\">var md5sum = crypto.createHash('md5');\r\n\r\nvar s = fs.ReadStream(filename);\r\ns.on('data', function(d) {\r\nmd5sum.update(d);\r\n});\r\n\r\ns.on('end', function() {\r\nvar generated_hash = md5sum.digest('hex');\r\nconsole.log( 'Generated Hash for file ' +generated_hash);\r\n});<\/pre>\n<h2>Using the npm module<\/h2>\n<p>Now, above steps can be simplified with use of the npm modules available. such as <a href=\"https:\/\/www.npmjs.com\/package\/md5\">md5<\/a> or <a href=\"https:\/\/www.npmjs.com\/package\/sha1\">sha1<\/a> which wil generate hash using <code>md5<\/code> and <code>sha1<\/code> algorithm.<\/p>\n<p>These modules does not uses the funcitons provided from <code>crypto<\/code> module rather, it implements using other crypto libraries such as <code>CryptoJS<\/code><br \/>\nAnd also these modules simplies steps of creating hash with just one simple function.<\/p>\n<h4>Using md5<\/h4>\n<p>First, you will need this module with following command, do it your Node project directory \u2013<br \/>\n<code>npm install md5<\/code><\/p>\n<p>Following code listing shows the usage-<\/p>\n<pre class=\"brush:perl\">var md5 = require(\u2018md5\u2019);\r\nvar msg = \u201csuper secret code\u201d;\r\nvar hash = md5(msg);<\/pre>\n<h4>Using sha1<\/h4>\n<p>Install module with following command, again execute same in project directory-<br \/>\n<code>npm install sha1<\/code><\/p>\n<p>Following code listing shows the usage-<\/p>\n<pre class=\"brush:perl\">var sha1 = require(\u2018sha1\u2019);\r\nvar msg = \u201csuper secret code\u201d;\r\nvar hash = sha1(msg);<\/pre>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td><span class=\"reference\">Reference: <\/span><\/td>\n<td><a href=\"https:\/\/blog.ajduke.in\/2016\/05\/28\/creating-a-hash-in-node-js\/\">Creating a hash in Node.js<\/a> from our <a href=\"http:\/\/www.webcodegeeks.com\/join-us\/wcg\/\">WCG partner<\/a> Abhijeet Sutar at the <a href=\"http:\/\/blog.ajduke.in\/\">ajduke&#8217;s blog<\/a> blog.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Introduction We require hashes everywhere,\u00a0like setting\u00a0the password in database as hash instead of plain text password, to check whether if file is tampered or not during transmission or\u00a0checking integrity of file or messages transferred over network, etc. This small article will give detailed look at creating hash from Node.js core crypto module and later in &hellip;<\/p>\n","protected":false},"author":165,"featured_media":924,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-13065","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-node-js"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Creating a hash in Node.js - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"Introduction We require hashes everywhere,\u00a0like setting\u00a0the password in database as hash instead of plain text password, to check whether if file is\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webcodegeeks.com\/javascript\/node-js\/creating-hash-node-js\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Creating a hash in Node.js - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"Introduction We require hashes everywhere,\u00a0like setting\u00a0the password in database as hash instead of plain text password, to check whether if file is\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/javascript\/node-js\/creating-hash-node-js\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2016-06-06T09:15:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/nodejs-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Abhijeet Sutar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/_ajduke\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Abhijeet Sutar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/node-js\/creating-hash-node-js\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/node-js\/creating-hash-node-js\/\"},\"author\":{\"name\":\"Abhijeet Sutar\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/8efaaec14bf1f285987574ec1eb4972c\"},\"headline\":\"Creating a hash in Node.js\",\"datePublished\":\"2016-06-06T09:15:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/node-js\/creating-hash-node-js\/\"},\"wordCount\":650,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/node-js\/creating-hash-node-js\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/nodejs-logo.jpg\",\"articleSection\":[\"Node.js\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/javascript\/node-js\/creating-hash-node-js\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/node-js\/creating-hash-node-js\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/javascript\/node-js\/creating-hash-node-js\/\",\"name\":\"Creating a hash in Node.js - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/node-js\/creating-hash-node-js\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/node-js\/creating-hash-node-js\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/nodejs-logo.jpg\",\"datePublished\":\"2016-06-06T09:15:55+00:00\",\"description\":\"Introduction We require hashes everywhere,\u00a0like setting\u00a0the password in database as hash instead of plain text password, to check whether if file is\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/node-js\/creating-hash-node-js\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/javascript\/node-js\/creating-hash-node-js\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/node-js\/creating-hash-node-js\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/nodejs-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/nodejs-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/node-js\/creating-hash-node-js\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JavaScript\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/javascript\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Node.js\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/javascript\/node-js\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Creating a hash in Node.js\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/8efaaec14bf1f285987574ec1eb4972c\",\"name\":\"Abhijeet Sutar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d37b9e8b23c65278f800401ed31ecbcd591e54ff336174c403e96ee0286e1b33?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d37b9e8b23c65278f800401ed31ecbcd591e54ff336174c403e96ee0286e1b33?s=96&d=mm&r=g\",\"caption\":\"Abhijeet Sutar\"},\"description\":\"Abhijeet (ajduke) is self-taught, self-organized software developer. His current go to language is Java and also he is exploring other languages such as Scala, Ruby.\",\"sameAs\":[\"http:\/\/blog.ajduke.in\/\",\"http:\/\/www.linkedin.com\/in\/ajduke\",\"https:\/\/x.com\/https:\/\/twitter.com\/_ajduke\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/abhijeet-sutar\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Creating a hash in Node.js - Web Code Geeks - 2026","description":"Introduction We require hashes everywhere,\u00a0like setting\u00a0the password in database as hash instead of plain text password, to check whether if file is","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.webcodegeeks.com\/javascript\/node-js\/creating-hash-node-js\/","og_locale":"en_US","og_type":"article","og_title":"Creating a hash in Node.js - Web Code Geeks - 2026","og_description":"Introduction We require hashes everywhere,\u00a0like setting\u00a0the password in database as hash instead of plain text password, to check whether if file is","og_url":"https:\/\/www.webcodegeeks.com\/javascript\/node-js\/creating-hash-node-js\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_published_time":"2016-06-06T09:15:55+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/nodejs-logo.jpg","type":"image\/jpeg"}],"author":"Abhijeet Sutar","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/_ajduke","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Abhijeet Sutar","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/javascript\/node-js\/creating-hash-node-js\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/node-js\/creating-hash-node-js\/"},"author":{"name":"Abhijeet Sutar","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/8efaaec14bf1f285987574ec1eb4972c"},"headline":"Creating a hash in Node.js","datePublished":"2016-06-06T09:15:55+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/node-js\/creating-hash-node-js\/"},"wordCount":650,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/node-js\/creating-hash-node-js\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/nodejs-logo.jpg","articleSection":["Node.js"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/javascript\/node-js\/creating-hash-node-js\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/javascript\/node-js\/creating-hash-node-js\/","url":"https:\/\/www.webcodegeeks.com\/javascript\/node-js\/creating-hash-node-js\/","name":"Creating a hash in Node.js - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/node-js\/creating-hash-node-js\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/node-js\/creating-hash-node-js\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/nodejs-logo.jpg","datePublished":"2016-06-06T09:15:55+00:00","description":"Introduction We require hashes everywhere,\u00a0like setting\u00a0the password in database as hash instead of plain text password, to check whether if file is","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/node-js\/creating-hash-node-js\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/javascript\/node-js\/creating-hash-node-js\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/javascript\/node-js\/creating-hash-node-js\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/nodejs-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/nodejs-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/javascript\/node-js\/creating-hash-node-js\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"JavaScript","item":"https:\/\/www.webcodegeeks.com\/category\/javascript\/"},{"@type":"ListItem","position":3,"name":"Node.js","item":"https:\/\/www.webcodegeeks.com\/category\/javascript\/node-js\/"},{"@type":"ListItem","position":4,"name":"Creating a hash in Node.js"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/8efaaec14bf1f285987574ec1eb4972c","name":"Abhijeet Sutar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d37b9e8b23c65278f800401ed31ecbcd591e54ff336174c403e96ee0286e1b33?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d37b9e8b23c65278f800401ed31ecbcd591e54ff336174c403e96ee0286e1b33?s=96&d=mm&r=g","caption":"Abhijeet Sutar"},"description":"Abhijeet (ajduke) is self-taught, self-organized software developer. His current go to language is Java and also he is exploring other languages such as Scala, Ruby.","sameAs":["http:\/\/blog.ajduke.in\/","http:\/\/www.linkedin.com\/in\/ajduke","https:\/\/x.com\/https:\/\/twitter.com\/_ajduke"],"url":"https:\/\/www.webcodegeeks.com\/author\/abhijeet-sutar\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/13065","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/165"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=13065"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/13065\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/924"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=13065"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=13065"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=13065"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}