Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 516 Bytes

(3 kyu) Base64 Encoding.md

File metadata and controls

18 lines (12 loc) · 516 Bytes

Base64 Encoding (3 kyu)

https://www.codewars.com/kata/5270f22f862516c686000161

Extend the String object (JS) or create a function (Python, C#) that converts the value of the String to and from Base64 using the ASCII (UTF-8 for C#) character set.

Do not use built in functions.

Usage:

// should return 'dGhpcyBpcyBhIHN0cmluZyEh'
'this is a string!!'.toBase64();
// should return 'this is a string!!'
'dGhpcyBpcyBhIHN0cmluZyEh'.fromBase64();

You can learn more about Base64 encoding and decoding here.