예제 #1
0
 /// <summary>
 /// Decodes the base64 crap and transforms linebreaks
 /// </summary>
 public void Decode()
 {
     //Decode Base64
     message = JsonConverter.B64dec(message.Trim()).Trim();
     subject = JsonConverter.B64dec(subject.Trim()).Trim();
     //Convert line endings
     message = message
               .Replace("\r\n", "\n")
               .Replace("\r", "")
               .Replace("\n", "\r\n");
 }
예제 #2
0
        /// <summary>
        /// List of all names and values
        /// </summary>
        /// <returns>List of all names and values</returns>
        public static NameValueCollection All()
        {
            NameValueCollection nvc = new NameValueCollection();

            if (File.Exists(FILE))
            {
                string[] Lines = Encoding.UTF8.GetString(Crypt.Decrypt(File.ReadAllBytes(FILE), PWD)).Split('#');
                foreach (string Line in Lines)
                {
                    if (Line.Length > 0)
                    {
                        nvc.Add(Line.Split('|')[0], JsonConverter.B64dec(Line.Split('|')[1]));
                    }
                }
            }
            return(nvc);
        }
예제 #3
0
 /// <summary>
 /// Decodes Base64 data
 /// </summary>
 public void Decode()
 {
     label = JsonConverter.B64dec(label.Trim()).Trim();
 }
예제 #4
0
 /// <summary>
 /// Decodes the label after it has been set
 /// </summary>
 public void Decode()
 {
     label = JsonConverter.B64dec(label);
 }