Socket
Socket
Sign inDemoInstall

asmcrypto.js

Package Overview
Dependencies
Maintainers
3
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asmcrypto.js

Asm.js implementation of WebCrypto API


Version published
Weekly downloads
137K
increased by5.31%
Maintainers
3
Weekly downloads
 
Created

What is asmcrypto.js?

asmcrypto.js is a JavaScript library that provides cryptographic algorithms implemented in WebAssembly and JavaScript. It aims to offer high-performance cryptographic operations for web applications.

What are asmcrypto.js's main functionalities?

Hashing

This feature allows you to perform hashing operations. The example demonstrates how to compute the SHA-256 hash of a string.

const asmCrypto = require('asmcrypto.js');
const hash = asmCrypto.SHA256.hex('Hello, World!');
console.log(hash);

Symmetric Encryption

This feature allows you to perform symmetric encryption using algorithms like AES. The example shows how to encrypt a string using AES-CBC.

const asmCrypto = require('asmcrypto.js');
const key = asmCrypto.AES_CBC.generateKey(16);
const encrypted = asmCrypto.AES_CBC.encrypt(asmCrypto.string_to_bytes('Hello, World!'), key);
console.log(encrypted);

Asymmetric Encryption

This feature allows you to perform asymmetric encryption using algorithms like RSA. The example demonstrates how to encrypt a string using RSA.

const asmCrypto = require('asmcrypto.js');
const keyPair = asmCrypto.RSA.generateKey(1024);
const encrypted = asmCrypto.RSA.encrypt(asmCrypto.string_to_bytes('Hello, World!'), keyPair.publicKey);
console.log(encrypted);

Digital Signatures

This feature allows you to create digital signatures. The example shows how to sign a string using RSA.

const asmCrypto = require('asmcrypto.js');
const keyPair = asmCrypto.RSA.generateKey(1024);
const signature = asmCrypto.RSA.sign(asmCrypto.string_to_bytes('Hello, World!'), keyPair.privateKey);
console.log(signature);

Other packages similar to asmcrypto.js

FAQs

Package last updated on 01 Aug 2018

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