Answer the question
In order to leave comments, you need to log in
How to find out the hash type and how to decode it?
Good day.
Trying to make my api for the iii.ru bot (I write in python) I came across the fact that the data is sent to this bot in the form of a hash, I suspect, here is an example:
JBYkHG4cLEE3RzdVPyoQWSEEMUs/ICNZIB1xAzAZIV07JxBSID1mBzU6ZwY4HjMEbzchCD4iLyUWPDBXLRlVHQ==
static function xorKey($res, $decode)
{
$key = "some very-very long string without any non-latin characters due to different string representations inside of variable programming languages";
$keylen = strlen($key);
$res = $decode ? base64_decode($res) : base64_encode($res);
$strlen = strlen($res);
$i = 0;
$result = '';
while ($i<$strlen)
{
$buf = $res[$i] ^ $key[$i % $keylen];
$result .= $buf;
$i++;
}
return $decode ? base64_decode($result) : base64_encode($result);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question