From fe6900d18f3178c2c415b039dc5f8c117c513466 Mon Sep 17 00:00:00 2001 From: Nick Karnik Date: Sat, 20 Apr 2013 10:58:43 -0700 Subject: [PATCH] Creating stubs for base64 encoding/decoding as listed in #362 --- src/Libraries/Web/Html/Window.cs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/Libraries/Web/Html/Window.cs b/src/Libraries/Web/Html/Window.cs index 2a111fb81..6fab1367e 100644 --- a/src/Libraries/Web/Html/Window.cs +++ b/src/Libraries/Web/Html/Window.cs @@ -324,6 +324,28 @@ public static void Alert(object o) { public static void AttachEvent(string eventName, ElementEventHandler handler) { } + /// + /// Decodes a string of data which has been encoded using base-64 encoding. + /// For use with Unicode or UTF-8 strings. + /// + /// Base64 encoded string + /// String of Binary data + [ScriptName("atob")] + public static string Base64ToBinary(string base64EncodedData) { + return null; + } + + /// + /// Creates a base-64 encoded ASCII string from a "string" of binary data. + /// Please note that this is not suitable for raw Unicode strings! + /// + /// String of binary data + /// Base64 string + [ScriptName("btoa")] + public static string BinaryToBase64(string stringToEncode) { + return null; + } + public static void Close() { }