mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 07:36:14 -05:00
licensing signature refactor
This commit is contained in:
@ -351,5 +351,25 @@ namespace Bit.Core.Utilities
|
||||
// Standard base64 decoder
|
||||
return Convert.FromBase64String(output);
|
||||
}
|
||||
|
||||
public static string FormatLicenseSignatureValue(object val)
|
||||
{
|
||||
if(val == null)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
if(val.GetType() == typeof(DateTime))
|
||||
{
|
||||
return ToEpocSeconds((DateTime)val).ToString();
|
||||
}
|
||||
|
||||
if(val.GetType() == typeof(bool))
|
||||
{
|
||||
return val.ToString().ToLowerInvariant();
|
||||
}
|
||||
|
||||
return val.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user