- February 19, 2016: Initial release.
GitHub Gist doesn't send notifications when people leave a comment, so shoot me an e-mail at [email protected]. I'll gladly fix it. Fuck advertising.
<?php | |
function hashPbkdf2($algorithm, $password, $salt, $iterations, $length = 0) | |
{ | |
// Number of blocks needed to create the derived key | |
$blocks = ceil($length / strlen(hash($algorithm, null, true))); | |
$digest = ''; | |
$length = strlen(hash($algorithm, '', true)); | |
if (strlen($password) > $length) { | |
$password = hash($algorithm, $password, true); | |
} |
Private-Key: (4096 bit) | |
modulus: | |
00:f0:71:c0:a3:bb:5f:cc:63:f9:55:33:ed:a3:d0: | |
78:ae:fc:ce:2e:f2:36:d1:e5:cb:64:d7:55:37:8b: | |
7b:a0:60:5e:31:c3:2a:b3:6e:1f:33:89:0a:ba:f5: | |
ab:48:0e:0d:f7:39:31:06:18:3d:66:d8:b9:0e:ba: | |
bb:08:46:78:3a:51:4b:61:d7:0a:9d:46:54:72:94: | |
71:b6:a7:82:58:5b:6d:96:11:ae:f7:d2:19:f2:b1: | |
20:e7:00:72:df:15:ac:1f:1e:1e:34:04:fc:0b:63: | |
b5:03:ff:47:34:27:c7:54:4e:ee:d7:c7:77:cd:1d: |
Suppose I have a friend named Alice. Alice has registered to WhatsApp with a | |
Saudi number but resides in Europe. We chat over WhatsApp regularly. We are both | |
using the latest version of WhatsApp for Android (2.16.155). | |
However, Alice is unable to receive or initiate WhatsApp calls, even though she | |
is in Europe and is using European WiFi. If you can test this, I suggest you do. | |
Get a Saudi phone number, register to WhatsApp, and then fly to France and make | |
a call. You will encounter the same result even if you're on French WiFi. | |
WhatsApp claims that "the Saudis are blocking the initial handshake [for |
function secure_rand(min, max) { | |
var rval = 0; | |
var range = max - min; | |
if (range < 2) { | |
return min; | |
} | |
var bits_needed = Math.ceil(Math.log2(range)); | |
if (bits_needed > 53) { | |
throw new Exception("We cannot generate numbers larger than 53 bits."); |
GitHub Gist doesn't send notifications when people leave a comment, so shoot me an e-mail at [email protected]. I'll gladly fix it. Fuck advertising.