Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Suxue committed Jan 9, 2024
1 parent ef3c84a commit affafe3
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Helpers/DecryptionHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,6 @@ public class DecryptionHelper
throw new Exception("搜索不到微信账号,请确认用户名是否正确,如错误请重新新建工作区,务必确认账号是否正确");
}
}
else if (find_key_type == 3)
{
string searchString = "-----BEGIN PUBLIC KEY-----";
}
return null;
}

Expand Down Expand Up @@ -192,6 +188,7 @@ public static void DecryptDB(string file, string to_file, byte[] password_bytes)

// 分页标志
var page_bytes = BitConverter.GetBytes(page_no + 1);
page_bytes = page_bytes.Take(4).ToArray();
page_bytes.CopyTo(going_to_hashed, DEFAULT_PAGESIZE - reserved - offset + IV_SIZE);
var hash_mac_compute = hmac_sha1.ComputeHash(going_to_hashed, 0, going_to_hashed.Length);

Expand Down Expand Up @@ -230,7 +227,7 @@ public static void DecryptDB(string file, string to_file, byte[] password_bytes)
byte[] reserved_byte = new byte[reserved];
fileStream.Seek((page_no * DEFAULT_PAGESIZE) + DEFAULT_PAGESIZE - reserved, SeekOrigin.Begin);
fileStream.Read(reserved_byte, 0, Convert.ToInt32(reserved));
reserved_byte.CopyTo(decryped_page_bytes, DEFAULT_PAGESIZE - reserved);
reserved_byte.CopyTo(decryped_page_bytes, Convert.ToInt32(DEFAULT_PAGESIZE - reserved));

tofileStream.Write(decryped_page_bytes, 0, decryped_page_bytes.Length);

Expand Down

0 comments on commit affafe3

Please sign in to comment.