GitHub PushEvent at 2014-03-14 15:15:59
Repository: ohanzee-helpers
Actor: WinterSilence
Payload: {"shas":[["ecc47c80727093d59ce48967159dd8d73f56568d","8139502e997881bcd8a6912d826183075d8ad20f@users.noreply.github.com","New properties, update Cookie::salt(), fix typo\n\n1. Deleted text license, because it' s already defined tag @license\r\n2. Salt separator '~' moved into property `Cookie::$separator`, it will easily change the value if necessary\r\n3. Added `Cookie::$hash_hmac` and `Cookie::$hash_hmac_algo` properties, they used in `Cookie::salt()` for generate secure salt.\r\n\r\nWhy not alter the class in a singleton? Access to variables must be accessed through methods rather than directly, it would prevent their values.\r\nExample:\r\n~~~\r\nprotected $hash_hmac_algo = 'sha512';\r\n\r\npublic function hashHmacAlgo($algo = null)\r\n{\r\n\tif ($algo === null) {\r\n\t\treturn $this->hash_hmac_algo;\r\n\t}\r\n\r\n\tif (! in_array($algo, hash_algos())) {\r\n\t\t// @todo create exceptions and replace it\r\n\t\tthrow new InvalidArgumentException(\r\n\t\t\tsprintf('%s: unknown hashing algorithm `%s`.', __METHOD__, $algo),\r\n\t\t);\r\n\t}\r\n\r\n\t$this->hash_hmac_algo = $algo;\r\n\r\n\treturn $this;\r\n}\r\n~~~","Anton",true]],"size":1,"ref":"refs/heads/patch-1","head":"ecc47c80727093d59ce48967159dd8d73f56568d"}