INNER CODE UNIT · JavaScript
percentageIncrease
jofpin/temcrypt · temcrypt.js:351
const percentageIncrease = ((encryptedSize - exposedSize) / exposedSize) * 100;
return {
hash: hashedData,
mainKey: mainKey,
timeKey: this.baseTime().hours + ":" + this.baseTime().minutes,
dataString: outputDataEncrypt,
dataSizes: {
exposed: exposedSizeBytes,
encrypted: encryptedSizeBytes,
percentageIncrease: percentageIncrease.toFixed(2) + "%"
},
extraBytes: extraBytesData
}
},
_decryptableString: function(stringEncrypted, key) {
if (!stringEncrypted || !key) {
throw new Error("Both encrypted data and key are required");