Immagmaallomb
New Member
The commercial software my company creates and sell currently uses a Base-64 encoded RSA-encrypted license key. The result is roughly 90 characters long. It is bulky and awkward to use, and prone to user error. Some users don't understand copy and paste very well and try to manually type the key.I'd like to replace the current algorithm with an approach that creates a smaller key, such as the 30-characters keys I see some other programs use. Furthermore, I notice that many software vendors use keys that only use digits and upper-case characters, making them even less cumbersome to use.What algorithm can I use to generate reasonably secure keys that embed username, product id, and version number, where the resulting license key is no longer than 30 characters and uses only digits and upper-case characters?(If important, we're coding in Java.)So...here's a start:\[code\]public String createLicenseKey(String customerName, String productId, String versionNumber) { // what goes here? return licenseKey;}String key = createLicenseKey("Max Headroom", "ABCD", "4");// key should now be in format AAAAAA-AAAAAA-AAAAAA-AAAAAA-AAAAAA\[/code\]