protected static function hmac($iv, $value, $key) { return substr(hash_hmac('sha256', $iv . $value, $key), 0, self::HMAC_SIZE * 2); }