renmove ResourceEnum, use filename only

add ToHash for encryption Key
This commit is contained in:
Alex Bezdieniezhnykh
2024-11-22 12:13:37 +02:00
parent 8be7625542
commit f5e466108a
16 changed files with 103 additions and 85 deletions
+2 -2
View File
@@ -13,11 +13,11 @@ public class SecurityTest
public async Task EncryptDecryptTest()
{
var testString = "Hello World Test dfvjkhsdbfvkljh sabdljsdafv asdv";
var username = "user@azaion.com";
var email = "user@azaion.com";
var password = "testpw";
var hardwareId = "test_hardware_id";
var key = Security.MakeEncryptionKey(username, password, hardwareId);
var key = Security.MakeEncryptionKey(email, password, hardwareId);
var encryptedStream = new MemoryStream();
await StringToStream(testString).EncryptTo(encryptedStream, key);