{"id":4689,"date":"2023-01-16T09:05:10","date_gmt":"2023-01-16T09:05:10","guid":{"rendered":"https:\/\/metaschool.so\/articles\/?p=4689"},"modified":"2025-01-08T10:45:15","modified_gmt":"2025-01-08T10:45:15","slug":"nodejs-crypto-module","status":"publish","type":"post","link":"https:\/\/metaschool.so\/articles\/nodejs-crypto-module\/","title":{"rendered":"Understanding Node.js Crypto Module"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_56_1 ez-toc-wrap-left counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title \" >Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/metaschool.so\/articles\/nodejs-crypto-module\/#What_is_the_Nodejs_Crypto_Module\" title=\"What is the Node.js Crypto Module?\">What is the Node.js Crypto Module?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/metaschool.so\/articles\/nodejs-crypto-module\/#How_does_it_work\" title=\"How does it work?\">How does it work?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/metaschool.so\/articles\/nodejs-crypto-module\/#Features_of_Nodejs_Crypto_Module\" title=\"Features of Nodejs Crypto Module\">Features of Nodejs Crypto Module<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/metaschool.so\/articles\/nodejs-crypto-module\/#Uses_of_Nodejs_crypto_Module_and_Additional_Crypto_NPM_Package\" title=\"Uses of Node.js crypto Module and Additional Crypto NPM Package\">Uses of Node.js crypto Module and Additional Crypto NPM Package<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/metaschool.so\/articles\/nodejs-crypto-module\/#Uses_of_the_Nodejs_Crypto_Module\" title=\"Uses of the Nodejs Crypto Module\">Uses of the Nodejs Crypto Module<\/a><ul class='ez-toc-list-level-3'><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/metaschool.so\/articles\/nodejs-crypto-module\/#1_Hashing\" title=\"1. Hashing \">1. Hashing <\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/metaschool.so\/articles\/nodejs-crypto-module\/#2_HMAC\" title=\"2. HMAC\">2. HMAC<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/metaschool.so\/articles\/nodejs-crypto-module\/#3_Generating_random_data\" title=\"3. Generating random data\">3. Generating random data<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/metaschool.so\/articles\/nodejs-crypto-module\/#4_Encryption_and_decryption\" title=\"4. Encryption and decryption\">4. Encryption and decryption<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/metaschool.so\/articles\/nodejs-crypto-module\/#Commonly_used_functions_in_the_crypto_module\" title=\"Commonly used functions in the crypto module\">Commonly used functions in the crypto module<\/a><\/li><\/ul><\/nav><\/div>\n\n<p>The Node.js crypto module is a built-in module that provides a variety of cryptographic functions for Node.js applications, which are written in JavaScript. JavaScript is a programming language that is primarily used for creating web applications, and Node.js is a JavaScript runtime that allows developers to run JavaScript code on a server.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_is_the_Nodejs_Crypto_Module\"><\/span>What is the Node.js Crypto Module?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The crypto model is part of the core libraries of Nodejs and doesn&#8217;t require any external dependencies. It provides developers with functions to perform cryptographic operations. The cryptographic operations supported on Nodejs crypto module are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Hashing data<\/li>\n\n\n\n<li>Encryption and decryption using both symmetric and asymmetric encryption algorithms<\/li>\n\n\n\n<li>Generating cryptography signatures and verifying<\/li>\n\n\n\n<li>Creating random numbers and keys<\/li>\n<\/ul>\n\n\n\n<p>These features make nodejs crypto module an important library for developers working with cryptography and blockchain applications and use cases.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-does-it-work\"><span class=\"ez-toc-section\" id=\"How_does_it_work\"><\/span>How does it work?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The Node.js crypto module provides a collection of cryptographic functionality like creating hashes, signing and verifying messages, and encrypting and decrypting data. These functions can be used to perform different types of encryption, decryption, signing, and hashing operations. <\/p>\n\n\n\n<p>It is implemented in C++ and it&#8217;s considered to be relatively fast and efficient. The crypto module is a great tool for adding security to your application by performing cryptographic operations on sensitive data.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Features_of_Nodejs_Crypto_Module\"><\/span>Features of Nodejs Crypto Module<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Hashing and HMAC:<\/strong> Input arbitrary size data and get fixed-sized digests. It has usage for data integrity and verification.<\/li>\n\n\n\n<li><strong>Symmetric Encryption:<\/strong> You can encrypt data using a key and decrypt it with the same key to reveal original data.<\/li>\n\n\n\n<li><strong>Asymmetric Encryption:<\/strong> In this form of encryption, there&#8217;s a key pair of public and private keys. Private keys are used to decrypt while it&#8217;s public key pair used to encrypt data.<\/li>\n\n\n\n<li><strong>Digital signatures:<\/strong> Generate and verify digital signatures for data to ensure integrity and authenticity.<\/li>\n\n\n\n<li><strong>Random Number Generation:<\/strong> Generate secure random numbers and keys (random numbers are used as keys and kept secret).<\/li>\n\n\n\n<li><strong>Password-Based key Derivation:<\/strong> Safely derive keys from password.<\/li>\n<\/ul>\n\n\n\n<p><strong>Plain Text:<\/strong> For example, the passwords that we type are plain text. Anything that we type or write and is humanly readable is plain text. It contains characters, numbers, and special characters.<\/p>\n\n\n\n<p><strong>Cipher Text:<\/strong> For example, &#8220;oiewhrgfsd23049854remf^&amp;dlj&#8221;, this random strong of text, numbers, and special characters is non-readable and not human understandable. It is generated randomly or from a text input.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"setting-up-node-js-crypto-module-and-additional-crypto-npm-package\"><span class=\"ez-toc-section\" id=\"Uses_of_Nodejs_crypto_Module_and_Additional_Crypto_NPM_Package\"><\/span>Uses of Node.js crypto Module and Additional Crypto NPM Package<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>1. The <code>crypto<\/code> module is a built-in module in Node.js, which means it is included with the Node.js installation package and does not need to be installed separately. <\/p>\n\n\n\n<p>You can check for the availability of the <code>crypto<\/code> module by using the <code>require<\/code> function. If the module is available, it will return an object containing the module&#8217;s exports. If the module is not available, it will throw an error.<\/p>\n\n\n\n<p>For example:<\/p>\n\n\n\n<pre class=\"wp-block-code has-nv-site-bg-background-color has-background\"><code>try {\n    var crypto = require('crypto');\n    console.log('crypto module is available');\n} catch (err) {\n    console.log('crypto module is not available');\n}<\/code><\/pre>\n\n\n\n<p>You can also use <code>typeof crypto<\/code> to check crypto module availability.<\/p>\n\n\n\n<pre class=\"wp-block-code has-nv-site-bg-background-color has-background\"><code>if (typeof crypto !== 'undefined') {\n    console.log('crypto module is available');\n} else {\n    console.log('crypto module is not available');\n}<\/code><\/pre>\n\n\n\n<p>2. There is also a npm crypto package. This package is not a replacement of the built-in crypto library, it is an addition. It provides additional functionality and flexibility over the built-in crypto library. <\/p>\n\n\n\n<p>If you wish to use the additional functionality provided by the npm package, you can install it using npm in your application and use it along with the built-in crypto library. <\/p>\n\n\n\n<p><strong>Installing Node.Js Crypto Module<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code has-nv-site-bg-background-color has-background\"><code>npm install crypto-js --save<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"187\" height=\"146\" src=\"https:\/\/metaschool.so\/articles\/wp-content\/uploads\/2023\/01\/image.png\" alt=\"Node.js crypto module structure\" class=\"wp-image-7748\" srcset=\"https:\/\/metaschool.so\/articles\/wp-content\/uploads\/2023\/01\/image.png 187w, https:\/\/metaschool.so\/articles\/wp-content\/uploads\/2023\/01\/image-150x117.png 150w\" sizes=\"auto, (max-width: 187px) 100vw, 187px\" \/><\/figure>\n\n\n\n<p>This will install the crypto package to your application and you can use it by requiring it in your code.<\/p>\n\n\n\n<pre class=\"wp-block-code has-nv-site-bg-background-color has-background\"><code>const crypto = require('crypto');<\/code><\/pre>\n\n\n\n<p>It&#8217;s important to note that if you&#8217;re using the crypto module in a development environment, you should always use the latest version of <a href=\"https:\/\/nodejs.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">Node.js<\/a>, as it may contain security updates and bug fixes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"uses-of-the-crypto-module\"><span class=\"ez-toc-section\" id=\"Uses_of_the_Nodejs_Crypto_Module\"><\/span>Uses of the Nodejs Crypto Module<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Here are a few examples of the functionality provided by the <code>crypto<\/code> module:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"1-hashing\"><span class=\"ez-toc-section\" id=\"1_Hashing\"><\/span>1. Hashing <span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>What is Hashing? Hashing is a method to convert a plain text to an encrypted text or cipher text. Hashing is a one-way cryptographic function, meaning that you cannot recover the original text from the cipher text, but you can regenerate the exact cipher text from the original text. This is used for securely storing login password details in the database. It is also used to validate authenticity of files, documents, and data. Some of the widely used hashing algorithms are MD5, RSA, SHA, etc.<\/p>\n\n\n\n<p>You can use the <code>crypto.createHash()<\/code> method to create a hash object and then use the <code>.update()<\/code> and <code>.digest()<\/code> methods to add data to the hash and generate a digest.<\/p>\n\n\n\n<pre class=\"wp-block-code has-nv-site-bg-background-color has-background\"><code>const crypto = require('crypto');\nconst hash = crypto.createHash('sha256');\nhash.update('some data to hash');\nconsole.log(hash.digest('hex')); \/\/outputs the hash of 'some data to hash'<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"2-hmac\"><span class=\"ez-toc-section\" id=\"2_HMAC\"><\/span>2. HMAC<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The crypto module also provides a way to create a keyed-hash message authentication code (HMAC) by using the <code>crypto.createHmac()<\/code> method.<\/p>\n\n\n\n<pre class=\"wp-block-code has-nv-site-bg-background-color has-background\"><code>const crypto = require('crypto');\nconst hmac = crypto.createHmac('sha256', 'a secret key');\nhmac.update('some data to hash');\nconsole.log(hmac.digest('hex')); \/\/outputs the hmac of 'some data to hash'<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"3-generating-random-data\"><span class=\"ez-toc-section\" id=\"3_Generating_random_data\"><\/span>3. Generating random data<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>You can use the <code>crypto.randomBytes()<\/code> method to generate cryptographically secure random data.<\/p>\n\n\n\n<pre class=\"wp-block-code has-nv-site-bg-background-color has-background\"><code>const crypto = require('crypto');\nconst buf = crypto.randomBytes(16);\nconsole.log(buf.toString('hex')); \/\/ outputs a random 16 bytes hexadecimal string<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"4-encryption-and-decryption\"><span class=\"ez-toc-section\" id=\"4_Encryption_and_decryption\"><\/span>4. Encryption and decryption<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Encryption algorithms take data input and a key input to generate a random ciphertext output. Encryption operations are reversible. The reverse of encryption is called decryption. The decryption process take the same secret key (private keys) and ciphertext as input to decipher the original data. An example of encryption\/decryption is in messaging apps like WhatsApp where messages and first encrypted before transferring them onto the network and then again decrypted at the readers end to keep messages secure from getting leaked and hacked. Triple DES, AES, RSA Security, Blowfish, Twofish, etc. are some example of encryption\/decryption algorithms.<\/p>\n\n\n\n<p>The crypto module provides a way to encrypt and decrypt data using symmetric key ciphers like AES.<\/p>\n\n\n\n<pre class=\"wp-block-code has-nv-site-bg-background-color has-background\"><code>const crypto = require('crypto');\nconst algorithm = 'aes-256-cbc';\nconst password = 'my secret key';\nconst key = crypto.scryptSync(password, 'salt', 32);\nconst iv = Buffer.alloc(16, 0);\n\nconst cipher = crypto.createCipheriv(algorithm, key, iv);\nlet encrypted = cipher.update('some data to encrypt', 'utf8', 'hex');\nencrypted += cipher.final('hex');\nconsole.log(encrypted); \/\/ outputs the encrypted data\n\nconst decipher = crypto.createDecipheriv(algorithm, key, iv);\nlet decrypted = decipher.update(encrypted, 'hex', 'utf8');\ndecrypted += decipher.final('utf8');\nconsole.log(decrypted); \/\/ outputs the decrypted data<\/code><\/pre>\n\n\n\n<p>These are just a few examples of the functionality provided by the <code>crypto<\/code> module in Node.js. <\/p>\n\n\n\n<p>The module provides many other cryptographic functions as well, such as creating digital signatures, Diffie-Hellman key exchange and various crypto primitives like RSA, ECDSA, and EdDSA.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"commonly-used-functions-in-the-crypto-module\"><span class=\"ez-toc-section\" id=\"Commonly_used_functions_in_the_crypto_module\"><\/span>Commonly used functions in the crypto module<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<div class=\"wp-block-columns has-nv-site-bg-background-color has-background is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column has-nv-site-bg-background-color has-background is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:50%\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<p class=\"has-nv-site-bg-background-color has-background\"><code>crypto.createHash(algorithm)<\/code>: creates a hash object that can be used to generate a hash (also known as a digest) of some data using the specified algorithm. The supported algorithms are sha1, sha256, sha512, md5, etc.<\/p>\n\n\n\n<p class=\"has-nv-site-bg-background-color has-background\"><code>crypto.createHmac(algorithm, key)<\/code>: creates a Hmac object that can be used to generate a hash-based message authentication code (HMAC) using the specified algorithm and key. The supported algorithms are sha1, sha256, sha512, md5, etc.<\/p>\n\n\n\n<p><code>crypto.createSign(algorithm)<\/code>: creates a signing object that can be used to sign data using the specified algorithm. The supported algorithms are RSA-SHA1, RSA-SHA256, RSA-SHA512, etc.<\/p>\n\n\n\n<p><code>crypto.createVerify(algorithm)<\/code>: creates a verification object that can be used to verify signed data using the specified algorithm. The supported algorithms are RSA-SHA1, RSA-SHA256, RSA-SHA512, etc.<\/p>\n\n\n\n<p><code>crypto.createCipher(algorithm, password)<\/code>: creates a cipher object that can be used to encrypt data using the specified algorithm and password. The supported algorithms are AES-128-CBC, AES-192-CBC, AES-256-CBC, etc.<\/p>\n\n\n\n<p><code>crypto.createDecipher(algorithm, password)<\/code>: creates a decipher object that can be used to decrypt data using the specified algorithm and password. The supported algorithms are AES-128-CBC, AES-192-CBC, AES-256-CBC, etc.<\/p>\n\n\n\n<p><code>crypto.createDiffieHellman(primeLength)<\/code>: creates a Diffie-Hellman key exchange object that can be used to securely exchange keys. The primeLength can be any value between 512 and 8192 in increments of 64.<\/p>\n\n\n\n<p><code>crypto.createECDH(curve)<\/code>: creates a Elliptic Curve Diffie-Hellman (ECDH) key exchange object that can be used to securely exchange keys. The curve can be any one of the named curves such as &#8216;secp521r1&#8217;, &#8216;secp384r1&#8217;, &#8216;prime256v1&#8217;, etc.<\/p>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<p><code>crypto.createDecipheriv(algorithm, key, iv)<\/code>: creates a <a href=\"https:\/\/metaschool.so\/articles\/createdecipheriv-method-node-js-crypto\/\">decipher object<\/a> that can be used to decrypt data using the specified algorithm, key and initialization vector (iv).<\/p>\n\n\n\n<p><code>crypto.createHash(algorithm, options)<\/code>: creates a hash object that can be used to <a href=\"https:\/\/metaschool.so\/articles\/what-is-the-crypto-node-js-createhash-method\/\">generate a hash<\/a> (also known as a digest) of some data using the specified algorithm and options.<\/p>\n<\/div><\/div>\n<\/div><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:50%\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<p class=\"has-nv-site-bg-background-color has-background\"><code>crypto.randomBytes(size)<\/code>: generates cryptographically strong pseudo-random data of the specified size. It is commonly used to generate random keys or nonces.<\/p>\n\n\n\n<p><code>crypto.randomFill(buffer, offset, size)<\/code>: fills the specified buffer with cryptographically strong pseudo-random data starting at the specified offset and continuing for the specified size.<\/p>\n\n\n\n<p><code>crypto.pbkdf2Sync(password, salt, iterations, keylen, digest)<\/code>: generates a derived key using the PBKDF2 algorithm, which is a password-based key derivation function.<\/p>\n\n\n\n<p><code>crypto.scryptSync(password, salt, keylen, options)<\/code>: generates a derived key using the scrypt algorithm, which is a password-based key derivation function designed to be more computationally expensive than PBKDF2.<\/p>\n\n\n\n<p><code>crypto.getCiphers()<\/code>: returns an array of the names of the supported ciphers.<\/p>\n\n\n\n<p><code>crypto.getHashes()<\/code>: returns an array of the names of the supported hash algorithms.<\/p>\n\n\n\n<p><code>crypto.getDiffieHellman(group_name)<\/code>: returns a predefined Diffie-Hellman key exchange object.<\/p>\n\n\n\n<p><code>crypto.createCredentials(options)<\/code>: creates a credentials object that can be used to establish secure connections using the tls module.<\/p>\n\n\n\n<p><code>crypto.createECDH(curve)<\/code> : creates a Elliptic Curve Diffie-Hellman (ECDH) key exchange object that can be used to securely exchange keys.<\/p>\n\n\n\n<p><code>crypto.publicEncrypt(key, buffer)<\/code> : encrypts the given buffer with the given public key.<\/p>\n\n\n\n<p><code>crypto.privateDecrypt(key, buffer)<\/code> : decrypts the given buffer with the given private key.<\/p>\n\n\n\n<p><code>crypto.generateKeyPairSync(type, options)<\/code> : generates a public\/private key pair in synchronous way.<\/p>\n\n\n\n<p><code>crypto.createCipheriv(algorithm, key, iv)<\/code>: creates a cipher object that can be used to encrypt data using the specified algorithm, key and initialization vector (iv).<\/p>\n\n\n\n<p><code>crypto.createCredentials(options)<\/code>: creates a credentials object that can be used to establish secure connections using the tls module.<\/p>\n<\/div><\/div>\n<\/div>\n<\/div>\n\n\n\n<p>That&#8217;s all for this guide. Hopefully you found it useful! \ud83d\udd2e<\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":6,"featured_media":11751,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","footnotes":""},"categories":[17],"tags":[305],"class_list":["post-4689","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blockchain","tag-node-js"],"_links":{"self":[{"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/posts\/4689","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/comments?post=4689"}],"version-history":[{"count":10,"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/posts\/4689\/revisions"}],"predecessor-version":[{"id":11740,"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/posts\/4689\/revisions\/11740"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/media\/11751"}],"wp:attachment":[{"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/media?parent=4689"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/categories?post=4689"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/metaschool.so\/articles\/wp-json\/wp\/v2\/tags?post=4689"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}