473,656 Members | 2,776 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Encrypt String

Hi Group, How can I encrypt a string in .NET, using .NET References.

thanks a lot.

Genaro
Feb 6 '06 #1
5 1265
There are many ways to encrypt strings in .NET, most of them residing in the
System.Security .Cryptography namespace.

Here's a good starting point:
http://SteveOrr.net/faq/encrypt.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Genaro Sanchez" <gs******@contr olsnow.com> wrote in message
news:e8******** ******@TK2MSFTN GP12.phx.gbl...
Hi Group, How can I encrypt a string in .NET, using .NET References.

thanks a lot.

Genaro

Feb 6 '06 #2
Not sure what you mean by ".net references". Strings cannot be encrypted
but rather you convert the strings to byte arrays and encrypt the bytes.

How much information are you looking for because you should be able to find
lots of tutorials on encryption by searching google.

You can also take a look at the System.Security .Cryptography namespace.

"Genaro Sanchez" <gs******@contr olsnow.com> wrote in message
news:e8******** ******@TK2MSFTN GP12.phx.gbl...
Hi Group, How can I encrypt a string in .NET, using .NET References.

thanks a lot.

Genaro

Feb 6 '06 #3
Thanks for the help.

"Steve C. Orr [MVP, MCSD]" <St***@Orr.ne t> wrote in message
news:eM******** *****@TK2MSFTNG P15.phx.gbl...
There are many ways to encrypt strings in .NET, most of them residing in
the System.Security .Cryptography namespace.

Here's a good starting point:
http://SteveOrr.net/faq/encrypt.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Genaro Sanchez" <gs******@contr olsnow.com> wrote in message
news:e8******** ******@TK2MSFTN GP12.phx.gbl...
Hi Group, How can I encrypt a string in .NET, using .NET References.

thanks a lot.

Genaro


Feb 6 '06 #4
Thanks
"Peter Rilling" <pe***@nospam.r illing.net> wrote in message
news:es******** ******@TK2MSFTN GP10.phx.gbl...
Not sure what you mean by ".net references". Strings cannot be encrypted
but rather you convert the strings to byte arrays and encrypt the bytes.

How much information are you looking for because you should be able to
find lots of tutorials on encryption by searching google.

You can also take a look at the System.Security .Cryptography namespace.

"Genaro Sanchez" <gs******@contr olsnow.com> wrote in message
news:e8******** ******@TK2MSFTN GP12.phx.gbl...
Hi Group, How can I encrypt a string in .NET, using .NET References.

thanks a lot.

Genaro


Feb 6 '06 #5
Check out this 5-part article :
http://www.dotnetbips.com/articles/d...le.aspx?id=297

Also, check out the Cryptography Application Block :
http://msdn.microsoft.com/library/de...ml/crypto1.asp

This 4guysfromrolla article might be of interest :
http://www.4guysfromrolla.com/webtech/090501-1.shtml


Juan T. Llibre
ASP.NET MVP
ASPNETFAQ.COM : http://www.aspnetfaq.com
=============== =============== ====
"Genaro Sanchez" <gs******@contr olsnow.com> wrote in message
news:e8******** ******@TK2MSFTN GP12.phx.gbl...
Hi Group, How can I encrypt a string in .NET, using .NET References.

thanks a lot.

Genaro

Feb 6 '06 #6

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

Similar topics

1
7948
by: wqhdebian | last post by:
As far as I know,when encrypt or decrypt ,a key must first be got,and the key is first generate by a tool or from SecurityRandom,that means I can not generate the same key with the same input.Does there is a method which can generate a same with the same input string? There is a need to transfer file between to site,and the customer wish to encrypt these files during transfering,and they want to store a string into each database at...
8
4269
by: toupeira23 | last post by:
Hello, I'm trying to encrypt passwords in my app. After discovering that there's no simple function to do this, I wrote a wrapper class which decodes a string using UTF8, encrypts it with TripleDES and returns a Base64-encoded string. The decryption function does the reverse, i.e. Base64-decodes the string, decrypts it with the same Key and IV, and encodes it again with UTF8. The problem is that after decrypting, the 8th character is...
2
3176
by: fineman | last post by:
Hi all, I want to get a 64bit(8 bytes) Encrypt result use DES class in the VS2005. Though I encrypt data is 64bit(8 bytes), but DES return encrypt result that always is 128bit(16 bytes), I don't know why? How to get a 64bit(8 bytes) encrypt result using DES class in the VS2005?
3
8270
by: JDeats | last post by:
I have some .NET 1.1 code that utilizes this technique for encrypting and decrypting a file. http://support.microsoft.com/kb/307010 In .NET 2.0 this approach is not fully supported (a .NET 2.0 build with these methods, will appear to encrypt and decrypt, but the resulting decrypted file will be corrupted. I tried encrypting a .bmp file and then decrypting, the resulting decrypted file under .NET 2.0 is garbage, the .NET 1.1 build works...
0
2137
by: lildiapaz | last post by:
Hi, everyone I'm developing a c# windows application that allows the user to encrypt any file type. i would like to encrypt the file using a powerful encrypting algorithm. I've tried to use the rinjael, triple des, but it doesn't seem to encrypt certain files at all. Can you please tell me what the problem is. I don't understand why this function doesn't work when I call it and encrypt the file. when I search for the file it still pulls up...
0
8382
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8297
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8816
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8600
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7311
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5629
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4150
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1930
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.