Needed for being able to generate unique reference names for references created from Wikidata. Because of the general nature of this, I think the module should rather live in Scribunto than in ArticlePlaceholder or even Wikibase.
I suggest using md5 which is fast and good enough for the use cases at hand.
Related change: https://gerrit.wikimedia.org/r/296177