🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
2 messages
2 total messages Started by Shane Stump Mon, 29 Oct 2007 01:18
GUID to Base64 or ANSI85 String?
#1143
Author: Shane Stump
Date: Mon, 29 Oct 2007 01:18
9 lines
1175 bytes
Does anyone have a component / method that will take a GUID and convert 
it to a BASE64 or ASCII85 string?

I need to have a uniquely generated string for a gift card module I am 
writing and I need it to be <= 22 characters.

Best Regards,

Shane
Re: GUID to Base64 or ANSI85 String?
#1146
Author: Remy Lebeau (TeamB)
Date: Mon, 29 Oct 2007 17:27
23 lines
1846 bytes
"Shane Stump" <ShaneATStumpWare.com> wrote in message 
news:472534e6@newsgroups.borland.com...

> Does anyone have a component / method that will take a GUID
> and convert it to a BASE64 or ASCII85 string?

If you go to http://www.deja.com and search through the newsgroup archives, 
examples of base64 algorithms have been posted many times before.  I have 
never heard of Ascii85 before, but a search on any web search engine 
produces links to many source code examples.

> I need to have a uniquely generated string for a gift card module
> I am writing and I need it to be <= 22 characters.

A base64-encoded GUID would not satisfy that requirement as it would always 
be 24 characters in length, as would a full ASCII85-encoded GUID as well. 
In the case of ASCII85, though, you could truncate off the begin and end 
markers (if you remember to put them back on before decoding), resulting in 
20 characters.


Gambit 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads