5[BadInteropApi(
"Base64")]
15 [BadMethod(description:
"Encodes the given string to a base64 string")]
16 [
return: BadReturn(
"Base64 String")]
17 private static string Encode([BadParameter(description:
"Bytes to Encode")] byte[] obj)
19 return Convert.ToBase64String(obj);
27 [BadMethod(description:
"Decodes a base64 string to an array of bytes")]
28 [return: BadReturn(
"Bytes")]
29 private static
BadArray Decode([BadParameter(description:
"String to Decode")] string str)
31 return new BadArray(Convert.FromBase64String(str).Select(x => (
BadObject)(decimal)x).ToList());
static string Encode([BadParameter(description:"Bytes to Encode")] byte[] obj)
Encodes the given object to a base64 string.
static BadArray Decode([BadParameter(description:"String to Decode")] string str)
Decodes the given base64 string to an array.
Implements a Dynamic List/Array for the BadScript Language.
The Base Class for all BadScript Objects.
Contains Compression Extensions and APIs for the BadScript2 Runtime.
Contains the Runtime Objects.