Click here to Skip to main content
15,915,772 members
Home / Discussions / C#
   

C#

 
Generalproblem with drawstring and font "Microsoft Sans Serif" Pin
yonitgil28-Jun-04 21:50
yonitgil28-Jun-04 21:50 
GeneralRe: problem with drawstring and font "Microsoft Sans Serif" Pin
Heath Stewart29-Jun-04 5:29
protectorHeath Stewart29-Jun-04 5:29 
GeneralWeifenLuos DockManager Question Pin
matthias s.28-Jun-04 21:39
matthias s.28-Jun-04 21:39 
GeneralRe: WeifenLuos DockManager Question Pin
Dave Kreskowiak29-Jun-04 4:31
mveDave Kreskowiak29-Jun-04 4:31 
Generalrestarting second counter Pin
Jason Ranin28-Jun-04 18:43
Jason Ranin28-Jun-04 18:43 
GeneralRe: restarting second counter Pin
Colin Angus Mackay29-Jun-04 1:46
Colin Angus Mackay29-Jun-04 1:46 
Generalcode with a foxpro database Pin
cmarmr28-Jun-04 18:07
cmarmr28-Jun-04 18:07 
GeneralRe: code with a foxpro database Pin
Heath Stewart29-Jun-04 5:04
protectorHeath Stewart29-Jun-04 5:04 
cmarmr wrote:
but when i encrypt it using csharp i can't decrypt it because the charter maping in csharp is diffrent i think because i can encrypt the letter "a" using my method but i can't read it from the table in its encrypted form and turn it back into a "a"

Why can't you? An array of characters is an array of characters. Taking away the storage of a character array in memory, every language pretty much treats an array of characters the same.

Apparently, you store this in a table field as a sequence of characters, so that's what you get back, correct? So why can't you decrypt this? You're using a two-way hash (not very good encryption at all, but perhaps good enough for your requirements) so if you apply the hash algorithm in reverse on the ciphertext you end up with your plaintext.

If you're having problems with the decrypt method, I suggest you post it here.

Also, I noticed you have this declared as an instance method. Encrypt and Decrypt (notice the casing, too, which is consistent with the recommended .NET naming conventions) would probably work better as statics. I mean, unless you're encapsulating functionality into the containing class, these two methods are really more procedural. Just a suggestion.

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: code with a foxpro database Pin
cmarmr29-Jun-04 15:19
cmarmr29-Jun-04 15:19 
GeneralRe: code with a foxpro database Pin
cmarmr2-Jul-04 3:29
cmarmr2-Jul-04 3:29 
GeneralRe: code with a foxpro database Pin
Heath Stewart2-Jul-04 3:35
protectorHeath Stewart2-Jul-04 3:35 
GeneralRe: code with a foxpro database Pin
cmarmr2-Jul-04 14:32
cmarmr2-Jul-04 14:32 
GeneralRe: code with a foxpro database Pin
Heath Stewart2-Jul-04 18:31
protectorHeath Stewart2-Jul-04 18:31 
GeneralCapture Pin
quocbao28-Jun-04 17:48
quocbao28-Jun-04 17:48 
GeneralPulling records within two sets of dates Pin
myNameIsRon28-Jun-04 17:38
myNameIsRon28-Jun-04 17:38 
GeneralRe: Pulling records within two sets of dates Pin
myNameIsRon28-Jun-04 20:08
myNameIsRon28-Jun-04 20:08 
GeneralRe: Capture live video. Pin
Dave Kreskowiak28-Jun-04 16:38
mveDave Kreskowiak28-Jun-04 16:38 
GeneralGetting table names from .mdb Pin
benglish7228-Jun-04 15:40
benglish7228-Jun-04 15:40 
GeneralRe: Getting table names from .mdb Pin
Heath Stewart29-Jun-04 3:34
protectorHeath Stewart29-Jun-04 3:34 
GeneralRe: Getting table names from .mdb Pin
benglish7229-Jun-04 14:30
benglish7229-Jun-04 14:30 
GeneralRe: Getting table names from .mdb Pin
Heath Stewart29-Jun-04 17:17
protectorHeath Stewart29-Jun-04 17:17 
QuestionHow to config **.exe.config by programming Pin
chansion28-Jun-04 15:04
chansion28-Jun-04 15:04 
AnswerRe: How to config **.exe.config by programming Pin
Dave Kreskowiak28-Jun-04 16:35
mveDave Kreskowiak28-Jun-04 16:35 
GeneralRe: How to config **.exe.config by programming Pin
Tom Larsen29-Jun-04 6:05
Tom Larsen29-Jun-04 6:05 
AnswerRe: How to config **.exe.config by programming Pin
Heath Stewart29-Jun-04 4:28
protectorHeath Stewart29-Jun-04 4:28 

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.