Socket
Book a DemoInstallSign in
Socket

@worldcerts/wo-encryption

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@worldcerts/wo-encryption

Shared library for managing oa encrypted file transfers

1.2.0
latest
Source
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

OpenCerts Encryption Library

This library is used for encrypting OpenCerts files in transit

API

Table of Contents

  • ENCRYPTION_PARAMETERS
  • generateEncryptionKey
  • encodeDocument
  • decodeDocument
  • IEncryptionResults
  • encryptString
  • decryptString

ENCRYPTION_PARAMETERS

Default options from responses here https://crypto.stackexchange.com/questions/26783/ciphertext-and-tag-size-and-iv-transmission-with-aes-in-gcm-mode/26787

algorithm

keyLength

ivLength

tagLength

version

generateEncryptionKey

Generates a random key represented as a hexadecimal string

Parameters

  • keyLengthInBits number Key length (optional, default ENCRYPTION_PARAMETERS.keyLength)

encodeDocument

Parameters

decodeDocument

Parameters

IEncryptionResults

encryptString

Encrypts a given string with symmetric AES

Parameters

Returns IEncryptionResults cipherText cipher text in base64

Returns any iv iv in base64

Returns any tag authenticated encryption tag in base64

Returns any key encryption key in hexadecimal

Returns any type The encryption algorithm identifier

decryptString

Decrypts a given ciphertext along with its associated variables

Parameters

  • $0 IEncryptionResults
    • $0.cipherText
    • $0.tag
    • $0.iv
    • $0.key
    • $0.type
  • cipherText string cipher text base64 encoded
  • tag string aes authentication tag base64 encoded
  • iv string iv base64 encoded
  • key string decryption key hexademical encoded
  • type string encryption algorithm identifier

Returns string

Keywords

open-attestation

FAQs

Package last updated on 03 Jul 2020

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.