mirror of
https://github.com/azaion/admin.git
synced 2026-04-22 08:56:33 +00:00
renmove ResourceEnum, use filename only
add ToHash for encryption Key
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user