473,480 Members | 4,985 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Encrypting a string

OK, this has me pulling my hair out. All I want to do is encrypt/decrypt
strings. They may be up to 400 characters in length though.

So, I assume System.Security.Cryptography is the one to use.

All the examples I have found are driving me nuts. They are either way too
long for something that I guess should be fairly straightforward, or I do
not especially trust them as they look pretty bad. The sample from MS only
applies to streams which I am not using.

Does anyone have any help? Sample code, as always, is most appreciated.

--
Bob Hollness

-------------------------------------
I'll have a B please Bob
Nov 21 '05 #1
7 1323
Not sure if you have already looked at this or not. Check out
http://msdn.microsoft.com/library/de...l/secmod25.asp

"Bob Hollness" <bo*@blockbuster.com> wrote in message
news:ex**************@TK2MSFTNGP12.phx.gbl...
OK, this has me pulling my hair out. All I want to do is encrypt/decrypt
strings. They may be up to 400 characters in length though.

So, I assume System.Security.Cryptography is the one to use.

All the examples I have found are driving me nuts. They are either way too
long for something that I guess should be fairly straightforward, or I do
not especially trust them as they look pretty bad. The sample from MS only
applies to streams which I am not using.

Does anyone have any help? Sample code, as always, is most appreciated.

--
Bob Hollness

-------------------------------------
I'll have a B please Bob

Nov 21 '05 #2
Thanks, i'll read through this. It applies to C# though. Do you have a VB
ready version?

--
Bob Hollness

-------------------------------------
I'll have a B please Bob

"Shiva" <sh******@online.excite.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Not sure if you have already looked at this or not. Check out
http://msdn.microsoft.com/library/de...l/secmod25.asp

"Bob Hollness" <bo*@blockbuster.com> wrote in message
news:ex**************@TK2MSFTNGP12.phx.gbl...
OK, this has me pulling my hair out. All I want to do is encrypt/decrypt
strings. They may be up to 400 characters in length though.

So, I assume System.Security.Cryptography is the one to use.

All the examples I have found are driving me nuts. They are either way
too
long for something that I guess should be fairly straightforward, or I do
not especially trust them as they look pretty bad. The sample from MS
only
applies to streams which I am not using.

Does anyone have any help? Sample code, as always, is most appreciated.

--
Bob Hollness

-------------------------------------
I'll have a B please Bob

Nov 21 '05 #3
"Bob Hollness" <bo*@blockbuster.com> schrieb:
Thanks, i'll read through this. It applies to C# though. Do you have a
VB ready version?


Converting code between .NET programming languages
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=languageconverters&lang=en>

;-)

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #4
Bob Hollness wrote:
OK, this has me pulling my hair out. All I want to do is encrypt/decrypt
strings. They may be up to 400 characters in length though.

So, I assume System.Security.Cryptography is the one to use.

All the examples I have found are driving me nuts. They are either way too
long for something that I guess should be fairly straightforward, or I do
not especially trust them as they look pretty bad. The sample from MS only
applies to streams which I am not using.

Does anyone have any help? Sample code, as always, is most appreciated.


My question thread:
http://groups-beta.google.com/group/...e6f17c0d4fc80d

The solution thread:
http://groups-beta.google.com/group/...637c01e9fdd5b3

(thanks to Cor for the link)

HTH,
Greg
Nov 21 '05 #5
This is great thanks!

--

Bob

--------------------------------------
I'll have a B please Bob.

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:OT**************@TK2MSFTNGP12.phx.gbl...
"Bob Hollness" <bo*@blockbuster.com> schrieb:
Thanks, i'll read through this. It applies to C# though. Do you have a
VB ready version?


Converting code between .NET programming languages
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=languageconverters&lang=en>

;-)

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #6
http://msdn.microsoft.com/library/de...classtopic.asp

Why have MS made this so difficult? If I want to encrypt a string it seems
very long-winded, whereas, if I want to encrypt an entire file there are
plenty of examples from them.
The only example they provide for encrypting a string uses the
RijndaelManaged class and is used to encrypt the key and IV. Either I have
missed something or it is not something easy.

AAARGRGGHHH, Help!!!!!

--

Bob

--------------------------------------
I'll have a B please Bob.

"Bob Hollness" <bo*@blockbuster.com> wrote in message
news:ex**************@TK2MSFTNGP12.phx.gbl...
OK, this has me pulling my hair out. All I want to do is encrypt/decrypt
strings. They may be up to 400 characters in length though.

So, I assume System.Security.Cryptography is the one to use.

All the examples I have found are driving me nuts. They are either way
too long for something that I guess should be fairly straightforward, or I
do not especially trust them as they look pretty bad. The sample from MS
only applies to streams which I am not using.

Does anyone have any help? Sample code, as always, is most appreciated.

--
Bob Hollness

-------------------------------------
I'll have a B please Bob

Nov 21 '05 #7
Thanks. this worked perfectly.

--

Bob

--------------------------------------
I'll have a B please Bob.

"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message
news:u%****************@TK2MSFTNGP14.phx.gbl...
Bob Hollness wrote:
OK, this has me pulling my hair out. All I want to do is encrypt/decrypt
strings. They may be up to 400 characters in length though.

So, I assume System.Security.Cryptography is the one to use.

All the examples I have found are driving me nuts. They are either way
too long for something that I guess should be fairly straightforward, or
I do not especially trust them as they look pretty bad. The sample from
MS only applies to streams which I am not using.

Does anyone have any help? Sample code, as always, is most appreciated.


My question thread:
http://groups-beta.google.com/group/...e6f17c0d4fc80d

The solution thread:
http://groups-beta.google.com/group/...637c01e9fdd5b3

(thanks to Cor for the link)

HTH,
Greg

Nov 21 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
2008
by: steve | last post by:
Hi, I know there are a few free and paid php source code encryption scripts around. Has anyone used one, and any feedback? I am interested in encrypting source that is placed on a remote host....
6
2061
by: Dayne | last post by:
Guys, I am writing a database application(vb.net , sql server) and is presently storing the connection settings in a xml file...not very secure though. What is a safer method in a dynamic...
4
7023
by: Andy G | last post by:
If users forget there passwords I want to send a link to them through email so they can click on a link and go to a change password page. eBay does this by sending you a url that looks something...
11
1923
by: frizzle | last post by:
Hi there, I need an encrypting function, but haven't got a clue where to start. First a string has to be encrypted with two different encryption keys. Both output should be anything a-z / A-Z /...
3
1747
by: Thirsty Traveler | last post by:
I hear that MD5 is not recommended for encrypting database passwords in that it can be compromised. Does anyone have a recomendation (SHA-1, etc.) on an algorithm that would be more appropriate.
5
2456
by: Chris Dunaway | last post by:
I have an application which is installed on a network share to be run from one or more workstations. I have granted trust to the applications on the workstations and the appropriate permissions on...
2
1843
by: Parrot | last post by:
I cannot get an answer as to why my session state no longer remains active between webpages after working for 2 years. So I want to try to pass data thru query strings in my url. I tried to use...
2
2256
by: SeeSharp Bint | last post by:
Visual Studio 2005, dotnet, c#. Microsoft SQL Server. Windows XP forms application. Temporarily, for my database application, I have been storing the various elements of database connection...
3
2456
by: Tery | last post by:
I'm trying to implement the Handango.com HTTP POST registration method. The instructions are here: http://www.handango.com/marketing/developerTeam/HTTP_Post_Reg_Model_How2.doc I'm stuck on how...
0
6905
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7041
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7080
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6736
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5331
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4772
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4478
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2994
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2980
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.