Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@oslojs/crypto

Package Overview
Dependencies
Maintainers
0
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@oslojs/crypto

A very basic crypto library

  • 0.5.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
41K
increased by5.47%
Maintainers
0
Weekly downloads
 
Created
Source

@oslojs/crypto documentation

Documentation: https://crypto.oslojs.dev

A basic JavaScript crypto library by Oslo. Includes APIs for SHA-1, SHA-2, HMAC, ECDSA, RSA, and cryptographically secure random generator.

  • Runtime-agnostic
  • No third-party dependencies
  • Fully typed

Installation

npm i @oslojs/crypto

Prerequisites

This package requires the Web Crypto API. This is available in most modern runtimes, including Node.js 20+, Deno, Bun, and Cloudflare Workers. The big exception is Node.js 16 and 18. Make sure to polyfill it using webcrypto.

import { webcrypto } from "node:crypto";

globalThis.crypto = webcrypto;

Alternatively, add the --experimental-global-webcrypto flag when executing files.

node --experimental-global-webcrypto index.js

Keywords

FAQs

Package last updated on 08 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc