It was copy-pasted from https://github.com/ameingast/cocoaimagehashing.
We needed a fix that can't be merged due to backward compatibility (ameingast/cocoaimagehashing#13), we don't need backward compatibility, so we use copypasted code.
Andreas Meingast (ameingast@gmail.com)
All source code is licensed under the BSD 3-clause.