INNER CODE UNIT · JavaScript
formedLayers
jofpin/temcrypt · temcrypt.js:307
const formedLayers = wrapEnd + invertedWrapper.substring(this.baseTime().seconds, invertedWrapper.length - this.baseTime().seconds) + wrapStart;
return formedLayers;
},
_encryptableString: function(string, mainKey, extraBytes) {
if (!string && !mainKey) {
throw new Error("Both string and key are required");
}
if (!string) {
throw new Error("string cannot be empty");
}
mainKey = mainKey || this.shadowToken();
const shadowToken = this.shadowToken();
const encryptedGhostLayer = this.helper(string).enc256(shadowToken + this.baseTime().minutes);
const exposedSize = this.byteLength(string);
const exposedSizeBytes = this.helper().calculateBytes(exposedSize);