protected function hash($value) { return NumericHelper::hexToBin(md5($value)); }
/** * Set hash for attributes. * * @param array $attributes */ public function setHash(array $attributes) { foreach ($attributes as $attribute) { $this->{$attribute . '_hash'} = NumericHelper::hexToBin(md5($this->{$attribute})); } }