日曜日, 11月 13, 2011

OAuth

Twitter uses OAuth for id verification. The encryption of the data is
using HMAC-SHA1 algorithm.

HMAC, Keyed-Hashing for Message Authentication Code
hash((key xor 0x5c5c...5c)
or (key xor 0x3636...36)
or message)

SHA, Secure Hash Algorithm
SHA-1 160 bit, MD4 based encoding

PHP: 定数を扱う

プロジェクトごとの定数を扱うクラス Config\Constants の紹介です。 <?php namespace Config; class Constants {     public const DB_USER = "linguist...