Socket
Book a DemoInstallSign in
Socket

@didww/encrypt

Package Overview
Dependencies
Maintainers
7
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@didww/encrypt

Encrypt files for DIDWW V3 API

1.5.3
latest
Source
npmnpm
Version published
Weekly downloads
407
-26.4%
Maintainers
7
Weekly downloads
 
Created
Source

DIDWW Encrypt

npm

Encrypts files for DIDWW V3 API in browser.

see details at DIDWW Documentation

Install

npm install @didww/encrypt

Encryption demo

https://didww.github.io/didww-encrypt/

Usage

import DidwwEncrypt from '@didww/encrypt'

const encryptor = new DidwwEncrypt({
    environment: 'sandbox'
})

let fingerprint = null
encryptor.getFingerprint().then(res => fingerprint = res) // => instance of String with fingerprint of public keys

// smallest png in base64 for an example
const pngBase64 = 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg=='
const pngFile = new File([atob(pngBase64)], 'test.png', { type: 'image/png', lastModified: new Date() })

let encryptedContainer = encryptor.encryptFile(pngFile).then(encrypted => {
    encryptedContainer.toFile() // => instance of File
    encryptedContainer.toArrayBuffer() // => instance of ArrayBuffer
    encryptedContainer.toString() // => instance of String in base64 format
})

or just load dist/browser.js to page and use window.DidwwEncrypt.

Keywords

DIDWW

FAQs

Package last updated on 18 May 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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.