Hi,
In junos 15.1 the default algorithm is SHA256 as noted in KB31903:
https://kb.juniper.net/InfoCenter/index?page=content&id=KB31903
Older hashes (eg. MD5) can be used on newer Junos releases - but is of course not recommended 🙂
In later releases (haven't found precisely which one it's introduced), the default is SHA512.
SHA256 hashes starts with $5$, SHA512 hashes starts with $6$.