我正在尝试使用用户输入的密码加密(然后解密)序列化备份。
我查看了文档,但我对VB相当新,并且无法理解它,所以如果有可能,有人可以解释我是如何做到这一点的吗?
这是序列化子:
Private Sub BackupAllToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles BackupAllToolStripMenuItem.Click
Dim formatter As New BinaryFormatter
Dim backupFile As New FileStream(fldSerBackup & Strings.Replace(Strings.Replace(Now, ":", "_"), "/", ".") & ".ser", FileMode.Create, FileAccess.Write, FileShare.None)
formatter.Serialize(backupFile, photoJobs)
backupFile.Close()
MsgBox("Collection saved to file")
End Sub
谢谢!
詹姆斯