mirror of
https://github.com/streetwriters/notesnook-sync-server.git
synced 2026-10-01 18:49:42 +02:00
identity: fix session revokation
This commit is contained in:
1 parent
3746c4b42b
commit
1f72e2c3a8
12 files changed
+100
-50
No files matched your search
@@ -26,15 +26,11 @@ namespace System
|
||||
{
|
||||
public static class StringExtensions
|
||||
{
|
||||
public static string ToSha256(this string rawData, int maxLength = 12)
|
||||
public static string Sha256(this string input)
|
||||
{
|
||||
// Create a SHA256
|
||||
using (SHA256 sha256Hash = SHA256.Create())
|
||||
{
|
||||
// ComputeHash - returns byte array
|
||||
byte[] bytes = sha256Hash.ComputeHash(Encoding.UTF8.GetBytes(rawData));
|
||||
return ToHex(bytes, 0, maxLength);
|
||||
}
|
||||
var bytes = Encoding.UTF8.GetBytes(input);
|
||||
var hash = SHA256.HashData(bytes);
|
||||
return Convert.ToBase64String(hash);
|
||||
}
|
||||
|
||||
public static byte[] CompressBrotli(this string input)
|
||||
|
||||
Reference in new issue
Block a user