Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #364 from theoutlander/cc

Creating stubs for base64 encoding/decoding as listed in #362
  • Loading branch information...
commit f28bfbd2e7baed0233d1277f39893bd6c575ced7 2 parents cb6e0f3 + fe6900d
@nikhilk authored
Showing with 22 additions and 0 deletions.
  1. +22 −0 src/Libraries/Web/Html/Window.cs
View
22 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() {
}
Please sign in to comment.
Something went wrong with that request. Please try again.