So I'm trying to write an application to encrypt files and store the, then when a user wants one, to decrypt it. I've got it working, the only problem is that when you open the decrypted pdf, it's blank. Any ideas why? These are the functions I'm using
' Function to generate a 64-bit key.
Function GenerateKey() As Byte()
'' Create an instance of a symmetric algorithm. The key and the IV are generated automatically.
'Dim desCrypto As DESCryptoServiceProvider = DESCryptoServiceProvider.Create()
'' Use the automatically generated key for encryption.
'Return ASCIIEncoding.ASCII.GetString(desCrypto.Key)
Dim passPhrase As String = "g1th3rapy"
Dim saltValue As String = "giptsalt"
Dim hashAlgorithm As String = "SHA1"
Dim passwordIterations As Integer = 2
Dim initVector As String = "@1B2c3D4e5F6g7H8"
Dim keySize As Intege ...
Go to the complete details ...