@signumjs/crypto
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-rc.75 • Public • Published

@signumjs/crypto

Cryptographic functions for building Signum apps.

Featured on Openbase

Installation

SignumJS can be used with NodeJS or Web. Two formats are available

Using with NodeJS and/or modern web frameworks

Install using npm:

npm install @signumjs/crypto

or using yarn:

yarn add @signumjs/crypto

Example

import {encryptAES, decryptAES, hashSHA256} from '@signumjs/crypto'

const encrypted = encryptAES('test', 'key')
const decrypted = decryptAES(encrypted, 'key')
console.log(hashSHA256('test'))
console.log(decrypted)

Using in classic <script>

Each package is available as bundled standalone library using UMD. This way signumJS can be used also within <script>-Tags. This might be useful for Wordpress and/or other PHP applications.

Just import the package using the HTML <script> tag.

<script src='https://cdn.jsdelivr.net/npm/@signumjs/crypto/dist/signumjs.crypto.min.js'></script>

Example

const encrypted = b$crypto.encryptAES("test", "key");
const decrypted = b$crypto.decryptAES(encrypted, "key");
console.log(b$crypto.hashSHA256("test"));
console.log(decrypted);

See more here: @signumjs/crypto Online Documentation

Package Sidebar

Install

npm i @signumjs/crypto

Weekly Downloads

8

Version

1.0.0-rc.75

License

Apache-2.0

Unpacked Size

1.7 MB

Total Files

119

Last publish

Collaborators

  • ohager