Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const axios = require('axios')
const shortid = require('shortid')
const { nanoid } = require('nanoid')

// import algo-methods
const { aesEncrypt, aesDecrypt } = require('./algorithms/aes')
Expand All @@ -18,12 +18,12 @@ function Kuda (param) {
privateKey = privateKey.toString()

const { clientKey } = param

if (!publicKey) return console.log('Error: publicKey is required!')
if (!privateKey) return console.log('Error: privateKey is required!')
if (!clientKey) return console.log('Error: clientKey is required!')
const password = `${clientKey}-${shortid.generate().substring(0, 5)}`

const password = `${clientKey}-${nanoid(5)}`

/**
* makes an encrypted call to Kuda API
Expand Down
Loading