Menu
Deno 1.14 extends Web Crypto API

Deno 1.14 extends Web Crypto API

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

Credit: Dreamstime

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 include the stabilising of the native server-side WebSocket API, in addition to the introduction of a web platform API for matching URLs against patterns 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 synchronisation.

Meamnwhile 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 and TypeScript 4.4 is included, as is the V8 9.4 JavaScript/WebAssembly engine.

Rounding off the new updates, the std/http module is faster, array buffers can be transferred between workers without needing copying, thus speeding up transfers for large buffers and 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 stabilised the native HTTP server API.


Show Comments