[INC] Base64 Encoding and Decoding library functions
1 Attachment(s)
Base64 functions for SourceMod
These were developed from a similar library for AMX Mod X. http://forums.alliedmods.net/showthread.php?t=87252 This library file includes functions for encoding and decoding text strings or binary data using the Base64 standard. Base64 has two main useful purposes:
This library includes the following stock functions: EncodeBase64 EncodeBase64(String:sResult[], len, const String:sString[], sourcelen=0) Encodes a string or binary data into Base64.
DecodeBase64 DecodeBase64(String:sResult[], len, const String:sString[]) Decodes a Base64 string.
Base64MimeToUrl Base64MimeToUrl(String:sResult[], len, const String:sString[]) Converts a standards-compliant Base64 string to the commonly accepted URL-compliant alternative.
Remember: The result will be the same length as the input string. Base64UrlToMime Base64UrlToMime(String:sResult[], len, const String:sString[], sourcelen) Converts a URL-compliant Base64 string to the standards-compliant version.
Remember: The result will be the same length as the input string. For an example application, check out the Jukebox for Source plugin, written by myself: http://forums.alliedmods.net/showthread.php?t=100537 I use Base64 to encode a multi-track playlist into the URL in a way that is compact and difficult to manipulate by hand. |
Re: [INC] Base64 Encoding and Decoding library functions
Cool, have an example on what this would be used for/in?
|
Re: [INC] Base64 Encoding and Decoding library functions
Yeah, good idea. I also forgot some details in the original post, so I will update it.
|
Re: [INC] Base64 Encoding and Decoding library functions
This is great :wink:
Thanks SirLamer! EDIT: Don't use decl on any statements that you want to fire through this thing, they need to be zero'd. |
Re: [INC] Base64 Encoding and Decoding library functions
Where has the file to be placed in CS:GO?
|
Re: [INC] Base64 Encoding and Decoding library functions
This is a library for plugin writers, not server owners TomXPro.
|
All times are GMT -4. The time now is 15:08. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.