zackmark29
Active member
- Joined
 - Apr 21, 2020
 
- Messages
 - 28
 
- Programming Experience
 - Beginner
 
Could someone help me.
I found this code from somewhere but I don't know how I can use this in my input files
I want to have the output file
I really don't know much how to use function.
	
	
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
	
		
			
		
		
	
				
			I found this code from somewhere but I don't know how I can use this in my input files
I want to have the output file
I really don't know much how to use function.
			
				VB.NET:
			
		
		
		 Class Decrypter
        Public Shared Function AES128Decrypt(ByVal filePath As String, ByVal keyByte As Byte(), ByVal ivByte As Byte(), ByVal Optional mode As CipherMode = CipherMode.CBC) As Byte()
            Dim fs As FileStream = New FileStream(filePath, FileMode.Open)
            Dim size As Long = fs.Length
            Dim inBuff As Byte() = New Byte(size - 1) {}
            fs.Read(inBuff, 0, inBuff.Length)
            fs.Close()
            Dim dcpt As Aes = Aes.Create("AES")
            dcpt.BlockSize = 128
            dcpt.KeySize = 128
            dcpt.Key = keyByte
            dcpt.IV = ivByte
            dcpt.Mode = mode
            dcpt.Padding = PaddingMode.PKCS7
            Dim cTransform As ICryptoTransform = dcpt.CreateDecryptor()
            Dim resultArray As Byte() = cTransform.TransformFinalBlock(inBuff, 0, inBuff.Length)
            Return resultArray
end function
        End Function