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

@vocdoni/encryption

Package Overview
Dependencies
Maintainers
5
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vocdoni/encryption

Javascript/Typescript encryption package

  • 1.14.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.9K
increased by33.55%
Maintainers
5
Weekly downloads
 
Created
Source

@vocdoni/encryption

@vocdoni/encryption contains encryption helpers for the dvote-js library

Installation

Use npm to install @vocdoni/encryption.

npm install @vocdoni/encryption

Usage

Asymmetric
import { Asymmetric } from "@vocdoni/encryption"

// See also: Asymmetric.encryptBytes, Asymmetric.encryptRaw
const encrypted = Asymmetric.encryptString("super secret", publicKey)
const decrypted = Asymmetric.decryptString(encrypted, privateKey)

console.log(decrypted)
// Prints "super secret
Symmetric
import { Asymmetric } from "@vocdoni/encryption"

// See also: Symmetric.encryptBytes, Symmetric.encryptRaw
const encrypted = Symmetric.encryptString("super secret", "my-passphrase")
const decrypted = Symmetric.decryptString(encrypted, "my-passphrase")

console.log(decrypted)
// Prints "super secret

Testing

To execute library tests just run

npm run test

FAQs

Package last updated on 22 Nov 2021

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