Do you think it's possible that the line ending \n is being interpolated differently on the server. Maybe try single quoting the string, and see what happens? I get different results with
&SHA("squeamish ossifrage\n");
# vs.
&SHA('squeamish ossifrage\n');