protected static function splitKeys($masterKey)
    {
        // You really want to implement HKDF here instead!
        return [
            hash_hmac(self::HASH_ALGO, 'ENCRYPTION', $masterKey, true),
            hash_hmac(self::HASH_ALGO, 'AUTHENTICATION', $masterKey, true)
        ];
    }
protected static function splitKeys($masterKey)
    {
        // You really want to implement HKDF here instead!
        return [
            hash_hmac(self::HASH_ALGO, 'ENCRYPTION', $masterKey, true),
            hash_hmac(self::HASH_ALGO, 'AUTHENTICATION', $masterKey, true)
        ];
    }
protected static function splitKeys ( $ masterKey ) { // You really want to implement HKDF here instead! return [ hash_hmac ( self :: HASH_ALGO , 'ENCRYPTION' , $ masterKey , true ) , hash_hmac ( self :: HASH_ALGO , 'AUTHENTICATION' , $ masterKey , true ) ] ; }
Splits a key into two separate keys; one for encryption
and the other for authenticaiton

@param string $masterKey (raw binary)
@return array (two raw binary strings)
Splits a key into two separate keys ; one for encryption and the other for authenticaiton