Essential Cryptography for JavaScript Developers, published by Packt
This is the code repository for Essential Cryptography for JavaScript Developers, published by Packt.
A practical guide to leveraging common cryptographic operations in Node.js and the browser
If you’re a software developer, this book will give you an introduction to cryptography, helping you understand how to make the most of it for your applications. The book contains extensive code samples in JavaScript, both for Node.js and for frontend apps running in a web browser, although the core concepts can be used by developers working with any programming language and framework.
This book covers the following exciting features:
- Write JavaScript code that uses cryptography running within a Node.js environment for the server-side or in frontend applications for web browsers
- Use modern, safe hashing functions for calculating digests and key derivation, including SHA-2 and Argon2
- Practice encrypting messages and files with a symmetric key using AES and ChaCha20-Poly1305
- Use asymmetric and hybrid encryption, leveraging RSA and Elliptic Curve Cryptography with ECDH and ECIES
- Calculate and verify digital signatures using RSA and ECDSA/EdDSA
- Manage passwords and encryption keys safelys
If you feel this book is for you, get your copy today!
All of the code is organized into folders.
The code will look like the following:
import {Encode} from 'arraybuffer-encoding/hex'
;(async () => {
const message = (new TextEncoder())
.encode('Hello world!')
const result = await window.crypto.subtle.digest(
'SHA-256',
message,
)
console.log(Encode(result))
})
()
Following is what you need for this book:
This cryptography book is an introductory guide for software developers who don’t necessarily have a background in cryptography but are interested in learning how to integrate it in their solutions, correctly and safely. You'll need to have at least intermediate-level knowledge of building apps with JavaScript and familiarity with Node.js to make the most of this book.
With the following software and hardware list you can run all code files present in the book (Chapter 1-8).
Installation of node.js and visual studio code editor is required.
Alessandro Segala is a product manager at Microsoft working on developer tools. A software engineer at heart, he has over a decade of experience building full stack web applications, having worked as a professional developer as well as contributing to and maintaining various open source projects. In addition to writing about software development on his blog, Alessandro had his first book, Svelte 3 Up and Running, published by Packt in 2020.
If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.