Alternative md5 or sha1 in js [closed]

  javascript, md5, php, sha1

I have generated a big array in js. Firt idea was to send the array with ajax to php and then use md5. But,as I mentioned the array is big so I think it is better hash it in js and then send with ajax to php. Couldnt find good way to do that.

in PHP we can do it like this:

$userlist = ['15.52115', '11.512551', '-51.512516'];
    $newone = md5(serialize($userlist));
    echo ('result:'. $newone);  //result: 88312d1512f3daf584997889fd49fabd

Is there any better way to hash like this without any library in js?
If not, which library is best to use?

Source: Ask PHP