Click here to Skip to main content
12,448,164 members (58,322 online)

Visual Basic

 
GeneralRe: Changing Assembly Properties through Reflection Pin
Eddy Vluggen16-Nov-12 0:06
memberEddy Vluggen16-Nov-12 0:06 
Questionmessagebeep Pin
Gil Goodridge14-Nov-12 8:00
memberGil Goodridge14-Nov-12 8:00 
AnswerRe: messagebeep Pin
Dave Kreskowiak14-Nov-12 8:31
mvpDave Kreskowiak14-Nov-12 8:31 
QuestionRijndael encryption not working Pin
maskrtnik0114-Nov-12 2:20
membermaskrtnik0114-Nov-12 2:20 
AnswerRe: Rijndael encryption not working Pin
Keith Barrow14-Nov-12 2:52
mentorKeith Barrow14-Nov-12 2:52 
GeneralRe: Rijndael encryption not working Pin
maskrtnik0114-Nov-12 3:08
membermaskrtnik0114-Nov-12 3:08 
GeneralRe: Rijndael encryption not working Pin
Keith Barrow14-Nov-12 3:26
mentorKeith Barrow14-Nov-12 3:26 
GeneralRe: Rijndael encryption not working Pin
Keith Barrow14-Nov-12 3:35
mentorKeith Barrow14-Nov-12 3:35 
GeneralRe: Rijndael encryption not working Pin
maskrtnik0114-Nov-12 3:48
membermaskrtnik0114-Nov-12 3:48 
GeneralRe: Rijndael encryption not working Pin
Keith Barrow14-Nov-12 4:05
mentorKeith Barrow14-Nov-12 4:05 
QuestionRe: Rijndael encryption not working Pin
maskrtnik0115-Nov-12 19:40
membermaskrtnik0115-Nov-12 19:40 
GeneralRe: Rijndael encryption not working Pin
DisIsHoody14-Nov-12 9:34
memberDisIsHoody14-Nov-12 9:34 
GeneralRe: Rijndael encryption not working Pin
maskrtnik0114-Nov-12 18:21
membermaskrtnik0114-Nov-12 18:21 
AnswerRe: Rijndael encryption not working Pin
DisIsHoody15-Nov-12 17:37
memberDisIsHoody15-Nov-12 17:37 
I've never tried encrypting something exactly as you are trying, but I believe the problem is that you're not calling the write method of the crypto stream. Check out the information on the write method of the crypto stream for for information. Below is a function I use to encrypt a string. As you can see I call the write method of the crypto stream and pass in a byte array of the data I want to encrypt. Hopefully the code below helps you.
Public Shared Function Encrypt(value As String, key() As Byte, iv() As Byte) As string
    Dim bytValue() As Byte      'The data to be encrypted
    Dim bytEncoded() As Byte    'The data after encryption
    Dim rijndael As New Rijndael Managed
    Dim ms As New MemoryStream  'The stream to write the encrypted data to
    
    bytValue = Encoding.ASCII.GetBytes(value.ToCharArray)   'Convert plain text to byte array
    'Create the crypto stream with the stream to write the encrypted data to (ms = Memory Stream)
    Using CryptoStream As New CryptoStream(ms, rijnadel.CreateEncryptor(key, iv), CryptoStreamMode.Write)
        'Encrypt the plaint text byte array (bytValue) to the memory stream (ms)
        CryptoStream.Write(bytValue, 0, bytValue.Length)
        'Flush crypto stream
        CryptoStream.FlushFinalBlock()
        'Get the encrypted byte array from the memory stream (ms)
        bytEncoded = ms.ToArray
        'Close memory stream
        ms.Close()
    End Using
    
    'Convert the encrypted byte array (bytEncoded) to a Base64 string and return it
    Return Convert.ToBase64String(bytEncoded)
End Function

GeneralRe: Rijndael encryption not working Pin
maskrtnik0115-Nov-12 19:37
membermaskrtnik0115-Nov-12 19:37 
QuestionRetrive date from sql server in system date format in VB6 application by a one time setting Pin
Johnson Antony13-Nov-12 13:34
memberJohnson Antony13-Nov-12 13:34 
AnswerRe: Retrive date from sql server in system date format in VB6 application by a one time setting Pin
Dave Kreskowiak13-Nov-12 14:00
mvpDave Kreskowiak13-Nov-12 14:00 
QuestionHow to find out if a file is in use before reading the data in that file Pin
KreativeKai13-Nov-12 7:47
memberKreativeKai13-Nov-12 7:47 
AnswerRe: How to find out if a file is in use before reading the data in that file Pin
Dave Kreskowiak13-Nov-12 8:09
mvpDave Kreskowiak13-Nov-12 8:09 
GeneralRe: How to find out if a file is in use before reading the data in that file Pin
KreativeKai13-Nov-12 8:22
memberKreativeKai13-Nov-12 8:22 
GeneralRe: How to find out if a file is in use before reading the data in that file Pin
KreativeKai13-Nov-12 8:46
memberKreativeKai13-Nov-12 8:46 
AnswerRe: How to find out if a file is in use before reading the data in that file Pin
KreativeKai13-Nov-12 8:13
memberKreativeKai13-Nov-12 8:13 
GeneralRe: How to find out if a file is in use before reading the data in that file Pin
Dave Kreskowiak13-Nov-12 9:57
mvpDave Kreskowiak13-Nov-12 9:57 
AnswerRe: How to find out if a file is in use before reading the data in that file Pin
Eddy Vluggen13-Nov-12 11:41
memberEddy Vluggen13-Nov-12 11:41 
GeneralRe: How to find out if a file is in use before reading the data in that file Pin
KreativeKai14-Nov-12 1:37
memberKreativeKai14-Nov-12 1:37 
GeneralRe: How to find out if a file is in use before reading the data in that file Pin
VitorHugoGarcia19-Nov-12 1:12
memberVitorHugoGarcia19-Nov-12 1:12 
QuestionVB Script for automatically turning off the monitor Pin
Prasan Cumar13-Nov-12 4:14
memberPrasan Cumar13-Nov-12 4:14 
AnswerRe: VB Script for automatically turning off the monitor Pin
Dave Kreskowiak13-Nov-12 4:59
mvpDave Kreskowiak13-Nov-12 4:59 
AnswerRe: VB Script for automatically turning off the monitor Pin
Bernhard Hiller13-Nov-12 21:20
memberBernhard Hiller13-Nov-12 21:20 
QuestionSQL Configuration Pin
DinoRondelly13-Nov-12 3:46
memberDinoRondelly13-Nov-12 3:46 
AnswerRe: SQL Configuration Pin
David Mujica13-Nov-12 4:07
memberDavid Mujica13-Nov-12 4:07 
GeneralRe: SQL Configuration Pin
DinoRondelly13-Nov-12 5:56
memberDinoRondelly13-Nov-12 5:56 
GeneralRe: SQL Configuration Pin
David Mujica13-Nov-12 9:44
memberDavid Mujica13-Nov-12 9:44 
GeneralRe: SQL Configuration Pin
DinoRondelly13-Nov-12 18:17
memberDinoRondelly13-Nov-12 18:17 
QuestionSource Code Pin
Member 939009712-Nov-12 15:59
memberMember 939009712-Nov-12 15:59 
AnswerRe: Source Code Pin
Dave Kreskowiak13-Nov-12 2:20
mvpDave Kreskowiak13-Nov-12 2:20 
QuestionMonitoring Network Usage For Remote Users Pin
DinoRondelly12-Nov-12 10:54
memberDinoRondelly12-Nov-12 10:54 
AnswerRe: Monitoring Network Usage For Remote Users Pin
Eddy Vluggen13-Nov-12 11:44
memberEddy Vluggen13-Nov-12 11:44 
QuestionScan Multipage Tiff Image For A Barcode Pin
daveofgv12-Nov-12 4:07
memberdaveofgv12-Nov-12 4:07 
AnswerRe: Scan Multipage Tiff Image For A Barcode Pin
Eddy Vluggen12-Nov-12 10:54
memberEddy Vluggen12-Nov-12 10:54 
QuestionGetting All Logged On Users and IP VB.net Pin
DinoRondelly12-Nov-12 3:39
memberDinoRondelly12-Nov-12 3:39 
AnswerRe: Getting All Logged On Users and IP VB.net Pin
Dave Kreskowiak12-Nov-12 4:37
mvpDave Kreskowiak12-Nov-12 4:37 
GeneralRe: Getting All Logged On Users and IP VB.net Pin
DinoRondelly12-Nov-12 4:44
memberDinoRondelly12-Nov-12 4:44 
GeneralRe: Getting All Logged On Users and IP VB.net Pin
Dave Kreskowiak12-Nov-12 4:52
mvpDave Kreskowiak12-Nov-12 4:52 
GeneralRe: Getting All Logged On Users and IP VB.net Pin
DinoRondelly12-Nov-12 4:55
memberDinoRondelly12-Nov-12 4:55 
GeneralRe: Getting All Logged On Users and IP VB.net Pin
Dave Kreskowiak12-Nov-12 5:55
mvpDave Kreskowiak12-Nov-12 5:55 
GeneralRe: Getting All Logged On Users and IP VB.net Pin
DinoRondelly12-Nov-12 6:11
memberDinoRondelly12-Nov-12 6:11 
GeneralRe: Getting All Logged On Users and IP VB.net Pin
Dave Kreskowiak12-Nov-12 6:46
mvpDave Kreskowiak12-Nov-12 6:46 
AnswerRe: Getting All Logged On Users and IP VB.net Pin
DinoRondelly12-Nov-12 8:05
memberDinoRondelly12-Nov-12 8:05 
GeneralRe: Getting All Logged On Users and IP VB.net Pin
Dave Kreskowiak12-Nov-12 10:02
mvpDave Kreskowiak12-Nov-12 10:02 

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.


Advertise | Privacy | Mobile
Web01 | 2.8.160811.3 | Last Updated 25 Aug 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid