Wrox Programmer Forums
|
BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5
This is the forum to discuss the Wrox book Beginning Visual Basic 2005 Databases by Thearon Willis; ISBN: 9780764588945
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 8th, 2008, 11:37 AM
Authorized User
 
Join Date: May 2008
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default Ch. 10 - Creating Registry Keys

I have worked through all of the steps in this Try It Out. I filled in the values on the form as specified (putting in my own values for Server, Login and Password). When I click Create, I get an error message in the Encrypt method saying "Specified key is not a valid size for this algorithm."

I have gone back to make sure that I typed in the values correctly in defining bytKey() and bytIV() in the btnCreate_Click sub and they are equal.

I am running Windows Vista (sorry) with .Net framework 2.0.50727. Any help would be greatly appreciated.

Eric S. Bauman

 
Old July 9th, 2008, 05:10 AM
Thearon's Avatar
Wrox Author
 
Join Date: Dec 2003
Posts: 396
Thanks: 0
Thanked 8 Times in 8 Posts
Default

Eric,

If you put in your own values for the bytKey() and bytIV() byte arrays you need to verify the length of the characters you are using. ASCII character codes on chart 1 (http://msdn.microsoft.com/en-us/library/60ecse8t(VS.80).aspx) will take up one byte in the array. ASCII character codes on chart 2 (http://msdn.microsoft.com/en-us/library/9hxt0028(VS.80).aspx) will take up two bytes in the array because they are considered unicode characters.

I hope this helps.

Thearon
 
Old July 9th, 2008, 12:32 PM
Authorized User
 
Join Date: May 2008
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you, Thearon. I found what was causing the error: the key wasn't getting set properly in the WDACrypto class. The error has been fixed and I was able to create the registry keys.

I appreciate your help and the books (I read Beginning VB 2005 before this); I've learned quite a bit in the past few months.





Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you scan for bad registry keys? raimir Pro VB.NET 2002/2003 4 June 11th, 2007 04:38 AM
Registry Keys reyboy General .NET 2 March 21st, 2005 08:25 PM
help on scanning for bad registry keys raimir Pro VB 6 2 January 7th, 2005 09:02 PM
Run registry keys in VBScript Quasimodo VBScript 2 August 8th, 2003 06:44 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.