-
- [LispFunction("Myencode:base64")]
- static public object myencodeBase64(ResultBuffer args)
- {
- try
- {
- TypedValue[] value = args.AsArray();
- int RTSTR = (int)LispDataType.Text;
- string instr = (string)value[0].Value;
- byte[] encbuff = System.Text.Encoding.UTF8.GetBytes(instr);
- string encodestr = Convert.ToBase64String(encbuff);
- ResultBuffer result = new ResultBuffer();
- result.Add(new TypedValue(RTSTR, encodestr));
- return result;
- }
- catch
- {
- return null;
- }
- }
|