Giter VIP home page Giter VIP logo

gm_base64's Introduction

Base64

Project started: 6/12/2020, Last updated: 6/12/2020

This is a C++ module for Garry's Mod which allows developers to encode strings to Base64 and decode them from Base64. I decided to make this because as of writing this, Garry's Mod only has a function to encode strings to Base64.

UPDATE: Garry's Mod now has util.Base64Decode() too, so this repository has been archived as it no longer serves much purpose.

Installation

  1. Download the latest release binary file for your server's operating system (win32 for Windows, osx for MacOS and linux for Linux)
  2. Rename the DLL prefix to match the realm you'll be using it on (Rename it to gmsv_base64_win32.dll if you're using it serverside on Windows, or gmcl_base64_win32.dll if you're using it clientside on Windows, etc.).
  3. Navigate to your server's root directory (where srcds.exe, garrysmod, bin, etc. are).
  4. Create a new folder inside garrysmod/lua/ called bin if it doesn't already exist.
  5. Place the renamed DLL file into that folder.
  6. Use the module in any Lua script by calling require("base64").

Usage

Here is a basic example on how to use this module:

require("base64")

local myString = "Hello World! This will be converted to Base64!"

local encoded = base64.encode(myString)
print(encoded) -- Should output 'SGVsbG8gV29ybGQhIFRoaXMgd2lsbCBiZSBjb252ZXJ0ZWQgdG8gQmFzZTY0IQ=='

local decoded = base64.decode(encoded)
print(decoded) -- Should output 'Hello World! This will be converted to Base64!'

gm_base64's People

Contributors

viral32111 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.