Reputation: 751
Are all API keys hexadecimal numbers by some sort of unwritten convention?
Upvotes: 5
Views: 1923
Reputation: 5187
No, API keys are hexadecimal numbers based upon a written convention.
API keys are based upon UUIDs.
"UUIDs are documented as part of ISO/IEC 11578:1996 "Information technology – Open Systems Interconnection – Remote Procedure Call (RPC)" and more recently in ITU-T Rec. X.667 | ISO/IEC 9834-8:2005. The IETF has published Standards Track RFC 4122 that is technically equivalent with ITU-T Rec. X.667 | ISO/IEC 9834-8."
MD5 keys used for most APIs are a version of UUIDs.
Upvotes: 0
Reputation: 68
Doing a md5 hash on a some semi random data (e.g. timestamp + userid + key) is a fast way to generate a key of a fixed length that is hard to guess.
Since md5 produces hex output, people just use it straight. They could convert to a high base, but there is not generally a big push to do so since the difference in data transmitted is so small.
Upvotes: 2