1.0.12 • Published 1 year ago

@turajs/crypto v1.0.12

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year ago

@turajs/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 @turajs/crypto

or using yarn:

yarn add @turajs/crypto

Example

import {encryptAES, decryptAES, hashSHA256} from '@turajs/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/@turajs/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: @turajs/crypto Online Documentation