A compact hash algorithm for CPUs and GPUs using OpenCL