hashing algorithms code bricks for JavaScript