public function hash($resource);
/** * Calculate a perceptual hash of an image string. * * @param mixed $data Image data * @return string */ public function hashFromString($data) { $resource = $this->createResource($data); $hash = $this->implementation->hash($resource); $this->destroyResource($resource); return $this->formatHash($hash); }