Modern Unix implementations of the Crypt library routine support a variety of different Ciphers.
The particular Cryptographic Hash Function used can be identified by a unique code prefix in the resulting hashtext, following a pseudo-standard called Modular Crypt Format.
We often need to do testing and found that we could do this as:
# perl -le 'print crypt("password","salt")' sa3tHJ3/KuYvI