Click here to Skip to main content
16,006,845 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionHelp please to use Enterprise library 3.1 Pin
jesusnaun21-Aug-07 9:36
jesusnaun21-Aug-07 9:36 
AnswerRe: Help please to use Enterprise library 3.1 Pin
Mark Churchill21-Aug-07 18:50
Mark Churchill21-Aug-07 18:50 
GeneralRe: Help please to use Enterprise library 3.1 Pin
jesusnaun22-Aug-07 4:06
jesusnaun22-Aug-07 4:06 
GeneralRe: Help please to use Enterprise library 3.1 Pin
Mark Churchill22-Aug-07 15:03
Mark Churchill22-Aug-07 15:03 
Questionmemorystream Pin
WhiteGirl2321-Aug-07 8:31
WhiteGirl2321-Aug-07 8:31 
AnswerRe: memorystream Pin
Dave Kreskowiak21-Aug-07 8:54
mveDave Kreskowiak21-Aug-07 8:54 
GeneralRe: memorystream Pin
Guffa21-Aug-07 11:13
Guffa21-Aug-07 11:13 
GeneralRe: memorystream Pin
WhiteGirl2321-Aug-07 19:28
WhiteGirl2321-Aug-07 19:28 
my code is:
Private Function DecryptFile(ByVal strInputFile As String, _<br />
                                     ByVal bytKey() As Byte, _<br />
                                     ByVal bytIV() As Byte) As String<br />
<br />
        Dim strBuilder As New StringBuilder<br />
        Dim mem As MemoryStream = New MemoryStream()<br />
      'Setup file streams to handle input and output.<br />
            fsInput = New System.IO.FileStream(strInputFile, FileMode.Open, _FileAccess.Read)<br />
            mem.SetLength(0)<br />
            'Declare variables for decrypt process.<br />
            Dim bytBuffer(4096) As Byte 'holds a block of bytes for processing<br />
            Dim lngBytesProcessed As Long = 0 'running count of bytes processed<br />
            Dim lngFileLength As Long = fsInput.Length 'the input file's length<br />
            Dim intBytesInCurrentBlock As Integer 'current bytes being processed<br />
            Dim csCryptoStream As CryptoStream<br />
            'Declare your CryptoServiceProvider.<br />
            Dim cspRijndael As New System.Security.Cryptography.RijndaelManaged<br />
<br />
            csCryptoStream = New CryptoStream(mem, _<br />
                      cspRijndael.CreateDecryptor(bytKey, bytIV), _<br />
                      CryptoStreamMode.Write)<br />
<br />
            'Use While to loop until all of the file is processed.<br />
            While lngBytesProcessed < lngFileLength<br />
                'Read file with the input filestream.<br />
                intBytesInCurrentBlock = fsInput.Read(bytBuffer, 0, 4096)<br />
                'Write output file with the cryptostream.<br />
                csCryptoStream.Write(bytBuffer, 0, intBytesInCurrentBlock)<br />
                'Update lngBytesProcessed<br />
                lngBytesProcessed = lngBytesProcessed + CLng(intBytesInCurrentBlock)<br />
<br />
            End While<br />
<br />
            Dim result As Byte() = mem.ToArray()<br />
           <br />
 Dim valu As String = System.Text.Encoding.ASCII.GetString(result)<br />

AnswerRe: memorystream Pin
Guffa22-Aug-07 4:57
Guffa22-Aug-07 4:57 
GeneralRe: memorystream Pin
WhiteGirl2322-Aug-07 9:01
WhiteGirl2322-Aug-07 9:01 
QuestionFile Association Pin
Kschuler21-Aug-07 7:34
Kschuler21-Aug-07 7:34 
Questionhandshaking through a subdirectory Pin
MartyK200721-Aug-07 6:55
MartyK200721-Aug-07 6:55 
AnswerRe: handshaking through a subdirectory Pin
Dave Kreskowiak21-Aug-07 7:34
mveDave Kreskowiak21-Aug-07 7:34 
GeneralRe: handshaking through a subdirectory Pin
MartyK200721-Aug-07 8:00
MartyK200721-Aug-07 8:00 
GeneralRe: handshaking through a subdirectory Pin
Dave Kreskowiak21-Aug-07 8:53
mveDave Kreskowiak21-Aug-07 8:53 
AnswerRe: handshaking through a subdirectory Pin
andyharman21-Aug-07 8:45
professionalandyharman21-Aug-07 8:45 
GeneralRe: handshaking through a subdirectory Pin
MartyK200721-Aug-07 21:05
MartyK200721-Aug-07 21:05 
AnswerRe: handshaking through a subdirectory Pin
Luc Pattyn21-Aug-07 12:30
sitebuilderLuc Pattyn21-Aug-07 12:30 
GeneralRe: handshaking through a subdirectory Pin
MartyK200721-Aug-07 21:07
MartyK200721-Aug-07 21:07 
QuestionCrystal Reports and Queries Pin
Dreamer200721-Aug-07 5:35
Dreamer200721-Aug-07 5:35 
AnswerRe: Crystal Reports and Queries Pin
TomGarth21-Aug-07 12:40
TomGarth21-Aug-07 12:40 
QuestionInstalling a font from setup Pin
dptalt21-Aug-07 5:30
dptalt21-Aug-07 5:30 
Questionregistering a library through regasm Pin
sheth.mital21-Aug-07 4:32
sheth.mital21-Aug-07 4:32 
AnswerRe: registering a library through regasm Pin
Dave Kreskowiak21-Aug-07 5:08
mveDave Kreskowiak21-Aug-07 5:08 
QuestionForm's Title Pin
ejaz_pk21-Aug-07 4:18
ejaz_pk21-Aug-07 4:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.