private static SecurityElement AtrToXml(Atr a) { SecurityElement ret = new SecurityElement("ATR"); ret.AddAttribute("Value", Convert.ToBase64String(a.GetValue())); ret.AddAttribute("Mask", Convert.ToBase64String(a.GetMask())); return ret; }