Permalink
Browse files

Creating stubs for base64 encoding/decoding as listed in #362

  • Loading branch information...
theoutlander committed Apr 20, 2013
1 parent cb6e0f3 commit fe6900d18f3178c2c415b039dc5f8c117c513466
Showing with 22 additions and 0 deletions.
  1. +22 −0 src/Libraries/Web/Html/Window.cs
@@ -324,6 +324,28 @@ public sealed class Window {
public static void AttachEvent(string eventName, ElementEventHandler handler) {
}
+ /// <summary>
+ /// Decodes a string of data which has been encoded using base-64 encoding.
+ /// For use with Unicode or UTF-8 strings.
+ /// </summary>
+ /// <param name="base64EncodedData">Base64 encoded string</param>
+ /// <returns>String of Binary data</returns>
+ [ScriptName("atob")]
+ public static string Base64ToBinary(string base64EncodedData) {
+ return null;
+ }
+
+ /// <summary>
+ /// Creates a base-64 encoded ASCII string from a "string" of binary data.
+ /// Please note that this is not suitable for raw Unicode strings!
+ /// </summary>
+ /// <param name="stringToEncode">String of binary data</param>
+ /// <returns>Base64 string</returns>
+ [ScriptName("btoa")]
+ public static string BinaryToBase64(string stringToEncode) {
+ return null;
+ }
+
public static void Close() {
}

0 comments on commit fe6900d

Please sign in to comment.