protected function generateMask()
    {
        if (extension_loaded('openssl')) {
            return openssl_random_pseudo_bytes(4);
        } else {
            // SHA1 is 128 bit (= 16 bytes)
            // So we pack it into 32 bits
            return pack('N', sha1(spl_object_hash($this) . mt_rand(0, PHP_INT_MAX) . uniqid('', true), true));
        }
    }