Esempio n. 1
0
        private static void WriteLicenseToStream(License license, Stream stream)
        {
            license = License.GetCrackModel();
            string       str1   = license.LicensedTo ?? "";
            string       str2   = "";
            BinaryWriter writer = new BinaryWriter(stream, Encoding.Unicode);

            writer.Write((byte)license.Type);
            writer.Write(0L);
            writer.Write(license.Version);
            if (license.Type == LicenseType.Personal)
            {
                OldLicenseSerializer.WriteDateTime(writer, license.PurchaseDate);
            }
            else
            {
                OldLicenseSerializer.WriteDateTime(writer, license.StartTime);
            }
            OldLicenseSerializer.WriteBytePrefixedString(writer, str1);
            OldLicenseSerializer.WriteBytePrefixedString(writer, str2);
        }
Esempio n. 2
0
 public static string LicenseToKeyOld(IEncoder encoder, License license)
 {
     license = License.GetCrackModel();
     return(67.ToString() + OldLicenseSerializer.Serialize(license, encoder));
 }