1.0.12 • Published 4 years ago

qr-code-encryption v1.0.12

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

qr-code-encryption

npm NPM node

Install

npm install qr-code-encryption

Usage

Encrypt QR Codes

To encrypt data into a QR code:

  • Insert the desired image location (if placed in a subfolder, please create this yourself) as the first parameter
  • Insert the data (or message) as the second parameter
  • (optional: Add a secret key as the third parameter - if not set, the qr is not encrypted)
  • (optional: add a callback to execute after the encryption has finished)
const { encryptQR } = require('qr-code-encryption');
encryptQR('code_images/encrypted_code.png', "hi bradley", "abcdef").then(() => {
    //code
})

Decrypt QR Codes

To decrypt a QR code:

  • Insert the desired image location (if placed in a subfolder, please create this yourself) as the first parameter
  • Add a secret key as the second parameter
  • Add a callback to extract the message
const {decryptQR} = require('qr-code-encryption');
decryptQR('code_images/encrypted_code.png', "abcdef").then((msg) => console.log(msg))
1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.0

4 years ago