Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

URL safe base 64 encoding for Data::UUID

by zerohero (Monk)
on Feb 06, 2009 at 08:19 UTC ( [id://741825]=perlquestion: print w/replies, xml ) Need Help??

zerohero has asked for the wisdom of the Perl Monks concerning the following question:

I'm using Data::UUID for (distributed) OID generation in an application. Sometimes OIDs will need to go into a URL as an argument. The current base-64 encoding scheme has several unsafe URL chars in it (e.g. "+/"). It would be nice to not have to urlencode the OIDs. Is there an alternate base-64 encoding module that works with Data::UUID to provide URL-safe OIDs?

  • Comment on URL safe base 64 encoding for Data::UUID

Replies are listed 'Best First'.
Re: URL safe base 64 encoding for Data::UUID
by juster (Friar) on Feb 06, 2009 at 08:39 UTC

    You could probably use MIME::Base64::URLSafe on the binary result from Data::UUID.

    But seeing how URLSafe is just a small wrapper around MIME::Base64 you could copy the code into your own project and have a wrapper around UUID's base64 method.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://741825]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (3)
As of 2024-04-26 05:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found