mirror of
https://github.com/jakeswenson/BitBetter.git
synced 2025-07-12 14:33:27 +00:00
Simplify constructors
This commit is contained in:
parent
43f2a98c17
commit
34b0669540
|
@ -378,8 +378,8 @@ internal class Program
|
||||||
Set("Trial", false);
|
Set("Trial", false);
|
||||||
Set("LicenseType", Enum.Parse(licenseTypeEnum, "User"));
|
Set("LicenseType", Enum.Parse(licenseTypeEnum, "User"));
|
||||||
|
|
||||||
Set("Hash", Convert.ToBase64String((Byte[])type.GetMethod("ComputeHash").Invoke(license, Array.Empty<Object>())));
|
Set("Hash", Convert.ToBase64String((Byte[])type.GetMethod("ComputeHash").Invoke(license, [])));
|
||||||
Set("Signature", Convert.ToBase64String((Byte[])type.GetMethod("Sign").Invoke(license, new Object[] { cert })));
|
Set("Signature", Convert.ToBase64String((Byte[])type.GetMethod("Sign").Invoke(license, [cert])));
|
||||||
|
|
||||||
Console.WriteLine(JsonConvert.SerializeObject(license, Formatting.Indented));
|
Console.WriteLine(JsonConvert.SerializeObject(license, Formatting.Indented));
|
||||||
return;
|
return;
|
||||||
|
@ -438,8 +438,8 @@ internal class Program
|
||||||
Set("LicenseType", Enum.Parse(licenseTypeEnum, "Organization"));
|
Set("LicenseType", Enum.Parse(licenseTypeEnum, "Organization"));
|
||||||
Set("LimitCollectionCreationDeletion", true); //This will be used in the new version of BitWarden but can be applied now
|
Set("LimitCollectionCreationDeletion", true); //This will be used in the new version of BitWarden but can be applied now
|
||||||
|
|
||||||
Set("Hash", Convert.ToBase64String((Byte[])type.GetMethod("ComputeHash").Invoke(license, Array.Empty<Object>())));
|
Set("Hash", Convert.ToBase64String((Byte[])type.GetMethod("ComputeHash").Invoke(license, [])));
|
||||||
Set("Signature", Convert.ToBase64String((Byte[])type.GetMethod("Sign").Invoke(license, new Object[] { cert })));
|
Set("Signature", Convert.ToBase64String((Byte[])type.GetMethod("Sign").Invoke(license, [cert])));
|
||||||
|
|
||||||
Console.WriteLine(JsonConvert.SerializeObject(license, Formatting.Indented));
|
Console.WriteLine(JsonConvert.SerializeObject(license, Formatting.Indented));
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user