Re: Long string to short ID
Matthew Evans <[email protected]>
| Newsgroups | gmane.comp.lang.erlang.general |
|---|---|
| Message-ID | <BLAPR07MB769976B7FCC2E7770D23804F9CFA9@BLAPR07MB7699.namprd07.prod.outlook.com> |
How about: 1> lists:flatten([integer_to_list(V,16)||<<V>> <= crypto:hash(md5, "really long book title that goes on and on forever")]). "C72BFE8643B0156ACD809D87D51E726C" OR 2> binary_to_list(base64:encode(crypto:hash(md5, "really long book title that goes on and on forever"))). "xyv+hkOwFWrNgJ2H1R5ybA==" ________________________________ From: erlang-questions <[email protected]> on behalf of Lloyd R. Prentice <[email protected]> Sent: Friday, August 13, 2021 3:44 PM To: erlang-questions <[email protected]> Subject: Long string to short ID Hello, What might be a nifty way to turn a long book title with spaces into a short human-readable ID? Thanks, LRP Sent from my iPad