1
0
mirror of https://github.com/bitwarden/server synced 2025-12-22 19:23:45 +00:00
Files
server/src/Core/Models/Business/ILicense.cs
Kyle Spearrin d9cd7880a6 license hash
2017-08-16 15:16:56 -04:00

23 lines
681 B
C#

using System;
using System.Security.Cryptography.X509Certificates;
namespace Bit.Core.Models.Business
{
public interface ILicense
{
string LicenseKey { get; set; }
int Version { get; set; }
DateTime Issued { get; set; }
DateTime? Refresh { get; set; }
DateTime? Expires { get; set; }
bool Trial { get; set; }
string Hash { get; set; }
string Signature { get; set; }
byte[] SignatureBytes { get; }
byte[] GetDataBytes(bool forHash = false);
byte[] ComputeHash();
bool VerifySignature(X509Certificate2 certificate);
byte[] Sign(X509Certificate2 certificate);
}
}