mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-14 10:06:58 -04:00
HTTP Gzip Decrypt working
This commit is contained in:
parent
90802db3c4
commit
b9d33c0618
5 changed files with 50 additions and 0 deletions
|
@ -344,6 +344,26 @@ const Utils = {
|
|||
},
|
||||
|
||||
|
||||
/**
|
||||
* Translates an array of bytes to a hex string.
|
||||
*
|
||||
* @param {byteArray} byteArray
|
||||
* @returns {string}
|
||||
*
|
||||
* @example
|
||||
* // returns "fe09a7"
|
||||
* Utils.byteArrayToHex([0xfe, 0x09, 0xa7]);
|
||||
*/
|
||||
byteArrayToHexNoSpace: function(byteArray) {
|
||||
if (!byteArray) return "";
|
||||
let hexStr = "";
|
||||
for (let i = 0; i < byteArray.length; i++) {
|
||||
hexStr += Utils.hex(byteArray[i]);
|
||||
}
|
||||
return hexStr.slice(0, hexStr.length-1);
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Converts a string to a byte array.
|
||||
* Treats the string as UTF-8 if any values are over 255.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue