added decrypt

master
cheetah 2 years ago
parent 67dae1bece
commit 6a1a81b25b

@ -38,7 +38,6 @@ class BOSkrypt {
.substring(0, 7) //take first 7 chars
}).join('') //join to one complete string
console.log('compressedPreparedPayload', compressedPreparedPayload)
let compressedPayload = []
for (let i=0;i<compressedPreparedPayload.length;i+=8) {
let byte = parseInt(
@ -51,8 +50,6 @@ class BOSkrypt {
compressedPayload.push( byte ) //put in array
}
compressedPayload = Buffer.from(compressedPayload)
console.log('compressedPayload', compressedPayload)
console.log('uncPayloadHash', uncPayloadHash.length, uncPayloadHash)
const toEncryptData = Buffer.concat([
uncPayloadHash, compressedPayload
])
@ -60,7 +57,6 @@ class BOSkrypt {
const encrpytedIncludingIVandSHA1Checksum = Buffer.concat([
ivWithTimestamp, encryptedPayload
])
console.log('ivWithTimestamp', ivWithTimestamp)
return encrpytedIncludingIVandSHA1Checksum.toString('base64')
}
decrypt(encrpytedIncludingIVandSHA1Checksum, key) {

Loading…
Cancel
Save