Bring crypto in line with go and ruby implemenations