Beispiel #1
0
 public UserDevice(UserData user)
 {
     rsaManager      = new RSAManager(user.UserPubKey.RSAParameters, user.UserPrivKey.RSAParameters);
     aesManager      = new AesManager();
     DevicePublicKey = user.DevicePublicKey.RSAParameters;
     FilesList       = user.Files;
     hmacManager     = new HMACManager(user.UserSecretKey);
     GenerateNonce();
     EncryptedSymmetricKey = user.EncryptedUserAesKey;
     Console.WriteLine($"From file: {user.EncryptedUserAesKey}");
 }
Beispiel #2
0
 public UserDevice()
 {
     rsaManager  = new RSAManager();
     hmacManager = new HMACManager();
     Nonce       = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
 }