Deno 1.14 extends Web Crypto API

Latest update to the Node.js rival also stabilizes the WebSocket API, introduces file locking APIs, and updates the Deno extension for Visual Studio Code.

Deno 1.14 extends Web Crypto API
JanBaby / Pixabay

Deno 1.14, the latest update to the TypeScript/JavaScript runtime and rival to Node.js, features a number of new additions to the Web Crypto API. The Web Crypto API is a standard JavaScript API for performing cryptographic operations such as hashing, signature generation, and encryption and decryption. 

Published September 14, Deno 1.14 adds crypto.subtle.exportKey(), which enables HMAC (Hash-based Messaging Authentication Code) keys to be exported in both JWK (Json Web Key) and “raw” formats, and allows RSA keys to be exported in pkcs#8 format. Release notes cite a number of other new Web Crypto APIs including crypto.subtle.encrypt() and crypto.subtle.decrypt(), which support RSA-OAEP (Optimal Asymetric Encryption Padding).

The developers of Deno hope to complete Deno’s Web Crypto API support by the end of the year. Other new features and improvements in Deno 1.14:

  • The native server-side WebSocket API has been stabilized.
  • A web platform API for matching URLs against patterns has been introduced, called URLPatterncode. Note that this API is currently unstable.
  • Four APIs have been introduced for file locking including Deno.flock, Deno.flockSync, Deno.funlock, and Deno.funlockSync. These APIs, currently unstable, will be essential for proper database synchronization.
  • Support is introduced for mutual TLS in fetch(). Mutual TLS is a way to authenticate a client to a server.
  • URL parsing is now faster.
  • TypeScript 4.4 is included, as is the V8 9.4 JavaScript/WebAssembly engine.
  • The std/http module is faster.
  • Array buffers can be transferred between workers without needing copying, thus speeding up transfers for large buffers.
  • The official Deno Visual Studio Code extension has been updated. Highlights include better configuration support when using the testing code lens and debug configuration improvements.

Deno 1.14 follows last month’s release of Deno 1.13, which stabilized the native HTTP server API.

Copyright © 2021 IDG Communications, Inc.