Пример #1
0
        internal string PrintClassKeys()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine("== Keybag");
            sb.AppendLine($"Keybag type:{ConstData.KEYBAG_TYPES[Type]} keybag {Type}");
            sb.AppendLine($"Keybag version:{Attrs.GetValueString("VERS")}");
            //sb.AppendLine($"Keybag iterations: {Attrs["ITER"]} iv={Attrs.GetValueString("SALT")}");
            sb.AppendLine($"Keybag UUID: {UUID.ShowString()}");
            sb.AppendLine(GetLineString());
            sb.AppendLine($"{"Class".PadRight(53)}{"WRAP".PadRight(5)}{"Type".PadRight(11)}{"Key".PadRight(65)}{"WPKY".PadRight(80)}Public key");
            sb.AppendLine(GetLineString());
            foreach (KeyValuePair <int, Dictionary <string, dynamic> > item in ClassKeys)
            {
                if (item.Key == 6)
                {
                    sb.AppendLine();
                }
                sb.AppendLine($"{ConstData.PROTECTION_CLASSES[item.Key].PadRight(53)}{item.Value.GetValue("WRAP", 0).ToString().PadRight(5)}{ConstData.KEY_TYPES[item.Value.GetValue("KTYP", 0)].PadRight(11)}{item.Value.GetValueString("KEY").PadRight(65)}{item.Value.GetValueString("WPKY").PadRight(80)}{item.Value.GetValueString("PBKY")}");
            }
            return(sb.ToString());
        }