Easy Encryption / Decryption Method For Strings

Jul 26, 2011

I'm trying to find a simple and easy encryption/decryption method for strings. The strings will contain spaces, special characters, numbers, and letters. I just need to be able to encrypt/decrypt them.

View 3 Replies


ADVERTISEMENT

AES Encryption / Decryption

Feb 1, 2012

Here is some code that works well for strings:

[Code]....

modifying these functions to encrypt/decrypt byte arrays rather than strings. Also, to have the functions return the encrypted/decrypted byte array, rather than a string.

View 2 Replies

Database Encryption And Decryption?

Jun 29, 2011

encrypt MS Access database and also decrypt it.

My purpose is to encrypt the database so that it cannot be open independently without using the application. my application should still be able to access it read/write.

View 2 Replies

Encryption Decryption To And From Text-box

May 17, 2009

At the moment I have a Form containing two text boxes and two buttons. I want the one textbox to be used to type a message (to be encrypted) and the second textbox will be for a key to decrypt the message. Button one will be for encryption and button 2 for decryption.

View 7 Replies

Encryption/Decryption Using Webservice?

Jun 24, 2009

From desktop application I want to upload an image. Then want to pass that image to webservice which encrypt it and pass it to another webservice which will save the encrypted image in the Access database. And then using ASP.net want to decrypt the image.

View 2 Replies

Encryption/Decryption With RijndaelManaged?

May 28, 2009

I have a Problem to Decrypt my crypted files :e.g. if I encrypt this text:

B�AR B�LASDJASPDJAPSDJPASDJPASD
asdj
...

And Decrypt it:

AB0_�-M3‚S�r�WPJAPSDJPASDJPASD
asdj
...

The first chars are wrong! My Code to Encrypt and Decrypt :

Encrypt:

Public Shared Sub EncryptFile(ByVal sSource As String, ByVal sTarget As String, Optional ByVal BufferSize As Long = 4096)
Dim ErrorHappened As Boolean = False
Dim OldFileStream As FileStream
Dim NewFileStream As FileStream

[code].....

View 1 Replies

Javascript Encryption And .net Decryption?

Oct 11, 2011

I need to encrypt a string using javascript and decrypt it using vb.net, is there a compatible encryption/decryption method between javascript and vb.net to be used?

View 5 Replies

VIDEO ENCRYPTION DECRYPTION

Jul 16, 2009

[Code] I need to do a video encryption/decryption on p2p chat. The concept for my understanding is to capture the video, encode it then encrypt, on the receiver side is to decode and decrypt it.

View 1 Replies

Finding Way For Easy Encryption?

May 22, 2009

Is there an easy way to encrypt things? Here is some code I got:

[code]...

View 9 Replies

Error On Encryption/decryption Files

Jan 31, 2010

When I decrypt an encrypted file; it doesn't have the same size in bytes as the original file and the the hash of the file is different.

I get the bytes of the file using File.ReadAllBytes and send to EncryptBytes with the password. Also the same with DecryptBytes.

When I receive the bytes encrypted or decrypted i save them using File.WriteAllBytes.

I need that the decrypted file and original file have the same hash an bytes.

This my code:

Public Function EncryptBytes(ByVal pass As String, ByVal bytes() As Byte)

Dim myRijndael As New RijndaelManaged
myRijndael.Padding = PaddingMode.Zeros
myRijndael.KeySize = 256

[Code].....

View 2 Replies

Implement Encryption And Decryption Algorithms?

Nov 30, 2010

How to implement encryption and decryption algorithms in vb.net? Which algorithm is the best suited one?

View 4 Replies

XML Encryption/Decryption In Separate Files?

Apr 27, 2011

I need to encrypt an XML file, send it to another location and decrypt it there. As you can see from the codes below, I am using the same key but it won't work (for now im simply using two local files).

The error I get is as follows:

Padding is invalid and cannot be removed.on this line in Decrypt.aspx: Dim xReader As XmlTextReader I am thinking it might be at the actual encryption stage causing errors e.g., file not saving correctly.

Encrypt.aspx
Dim rijnAlg As RijndaelManaged
rijnAlg = RijndaelManaged.Create()

[code]......

View 2 Replies

Encryption / Decryption Program - Slow Process

Jul 18, 2010

I was board making web browsers and OS so, I tried making an Encryption/Decryption program. I surfed the net and found a source code. But, after doing everything, I debug it, click the encrypt btn and nothing happens. I though the encrypting is a slow process. The thing is the process should be immediate cause I downloaded this web browser called 'Areo Pack'. It comes with a few other program and one of them in an Encryption/Decryption program. I tried it and it was done in a few seconds. I tried opening the encrypted file with notepad and I see a text file with Chinese, Japaneses, Korean, etc.

Imports System.Security.Cryptography
Imports System.Text
Public Class Form1
Private Shared DES As New TripleDESCryptoServiceProvider
Private Shared MD5 As New MD5CryptoServiceProvider
[Code] .....

View 2 Replies

Make A Key That Will Be Used In File Encryption/decryption For An Application?

Jul 12, 2011

I am trying to make a key that will be used in file encryption/decryption for my application. However, there is no user data involved with this application (As i would usually use the user's password to generate the encryption key), so i have to turn to another method.

I am thinking that maybe it is possible to generate a completely random key the first time the program runs, then save this key inside the program so that it is inaccessible by the user. The user will not be shown this key, but the key MUST be randomly generated for each application, and it also must stay constant once it is created.

View 1 Replies

Secure(ish) Encryption/decryption Algorithms Using A String As A Key?

Aug 25, 2009

Is there a way to encrypt/decrypt text (string form) in VB.net using another string as a key? Meaning, if one user encrypts using this key, the other user needs to decrypt using the same key?I do NOT mean public and private key encryption or anything of the sort.If not, what is the second best way to encrypt/decrypt data without public/private keys?I want to make a simple way to send messages securely.

View 2 Replies

Simple Encryption / Decryption Program Does Not Process

Aug 13, 2009

This is for a simple encryption / decryption program. However when I run this the program does nothing and doesnt respond. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim decryptedtext As String
Dim encryptedtext As String
Dim k As Int16

[code]...

View 3 Replies

VS 2005 Encryption/Decryption With Crytography Classes?

Aug 25, 2009

I'm using the cryptography classes in .net to encrypt and decrypt files. When I encrypt a txt file, then decrypt in my code it works fine. But when I encrypt an xml file and try to decrypt it within my code I get an error saying "padding is invalid and cannot be removed." I am setting the padding during both the encryption and decryption as:

PaddingMode.PKCS7. Do you think the file being an xml file has something to do with the error that's occuring? Also, should I or should I not be setting the padding for both encryption and decryption?

View 5 Replies

Complete VB Project Of Image Encryption And Decryption With Codes?

Mar 17, 2010

Complete VB project of Image Encryption And Decryption with codes

View 4 Replies

Encryption Of A Text File + Decryption For Security Program?

Feb 10, 2011

What I've decided to start working on is pretty much a personal project but something I may use in my UNI course in due time. I'm creating a security program with a set of access codes (yes I am a bit of a star trek fan) - 4 in total to be exact. I want to be able to use an Encrypted key file in form of a simple notepad created text file to update the codes at any due time. All I'm looking to do is write the access codes to the text file (say for a friend to use the program), Encrypt the file through the program and be able to also decrypt to obtain the new access codes on demand also via the same program. Once decrypted the codes can be read and verified if the user has entered each one correctly. I could hard code the access codes into the program but would rather do it the way I've thought of.

Back in the days of the old VB6 there was a simple method but for some reason that doesnt work any more. What I guess I'm looking to do is have 4 text fields where 4 digit access codes are typed into, have the program take them and encrypt each one is then written to the text file. Hoping that will make it a bit clearer what I'm trying to achieve as I think I made it sound like I want to encrypt the text file after the info has been written to it, which is of course one option so wouldn't mind know how to do that too!

View 3 Replies

Fail To Make A Text Encryption And Decryption Program

Nov 13, 2011

I am trying and failing to make a text encryption and decryption program. How can I encrypt and decrypt text or text files?

View 6 Replies

VS 2010 Filesize Is Same As Original After Encryption / Decryption Process

Jun 22, 2011

I have (using some examples) created a program which reads from a file, encrypts the content and writes it to a new file. The file can then be reopened in the program and decrypted.Now I am trying to adapt the program to split the file into pieces as specified by the user whilst it is been written to the hard drive. This also works, but when the files are read and decrypted the original file seems to be corrupted. I have been testing it using a JPG which turns out viewable, but is distorted. However the filesize is the same as the orignal after the encryption/decryption process. [code]

View 3 Replies

RijnDael Encryption/decryption - Select The Key Bytes And The Block Bytes From The Numeric Up/down?

Nov 13, 2010

I want it to do is that you input a string, then you select an algorithm (Theres only going to be one RijnDael) then you input a key, then the Initialization Vector comes from "txtIV.text" then you select the key bytes and the block bytes from the numeric up/down, then you either encrypt or decrypt.

View 1 Replies

Encryption/Decryption - Code To Encrypt A File->networkstream->Decrypt The File

Feb 28, 2011

I'm having trouble writing the code to encrypt a file->networkstream->Decrypt the file.. I've tried several ways, but I keep failing....

View 1 Replies

Encryption - Byte Arrays And Strings?

Oct 6, 2008

I am in need of encrypting a byte array, but my encryption method that I found strictly deals with strings.

Here are the two pieces of code that I am dealing with.:

The byte array (the bytes that need to be sent encrypted)

Code:
Dim outStream As Byte() = System.Text.Encoding.ASCII.GetBytes(TextBox2.Text + "$")
serverStream.Write(outStream, 0, outStream.Length)
serverStream.Flush()

[Code]....

View 4 Replies

.netCART Credit Card Decryption - IIS 7 App Pool And Decryption?

May 18, 2009

I've got a site using .netCART. It's running fine in production with Windows Server 2003 and .NET 2.0. On the new server (Windows Server 2008) everything is working except for credit card decryption in the store admin. No errors are being sent, no exceptions thrown, just the encrypted string being output to the screen instead of a decrypted credit card number.

Dim strCCEncrypt As String
strCCEncrypt = Trim(DataRow.Item("CreditCard"))
strCCEncrypt = tools.Decrypt(strCCEncrypt) 'tools is a .netCART utility

[code].....

View 3 Replies

Which Encryption Method Is Better?

Aug 9, 2009

I've seen a lot of threads on the web discussing about which encryption algorithm is better.According to what I've read, AES encryption algorithm is based on Rijndael's algorithm, and the first is the one being implemented by the US's government to secure TOP SECRET files.From what I've tried RijndaelManaged only supports 128bit long keys (that would be a byte array with 16 byte values, right?) and not 256 as I had first thought; however, AES seems to support 256bit keys (or is it all the way around?), I haven't personally tried DES nor TripleDES.

So, which one is better or more secure? And what's up with asymmetrical encryption? What's the difference? Can both symmetrical and asymmetrical encryption be used for the same thing?

View 24 Replies

Convert .NET Encryption Method To PHP?

Dec 2, 2011

I desperately need this VB.NET code converted to PHP.This is the Instructions I received:To test your encryption, encrypt the following word with these keys and check if you get the same result:

Text to encrypt: MyPassword
Salt key: *&^%$#@!
PBE Key: FWV70700[code].....

View 1 Replies

Overload The Method To Allow Strings Instead Of Integer

Jul 2, 2011

I am working on this project and I am suppose to overload the method to allow strings instead of integer. Allow the user optionally add a thried string from a third text box. Okey I am trying to under stand this good. This is the code I have:

This is my overload class

Public Class OverloadEx

[CODE]........................

So with my overload class instead of integer I should put string there? If the user clicks the add button it will allow the user to add all 3 text boxes but when the user click the add string it will allow the user to add all three text boxes to string. So do I click the add string button to overload it to that one just like I did with the add?

View 13 Replies

C# - Method To Find / Eliminate Repetitive Strings?

Aug 14, 2011

I am trying to find a solution, in eliminating repetitive string names, say for ex.,in a literal field, i am populating names of the contributor of certain article's history version, and so, if "ron" has contributed to the versioning of an article 3 times, the name "ron" gets added to this literal control, and outputs "ron" 3 times.

View 5 Replies

Text Encryption Using Replace Text Method?

Oct 15, 2009

Suppose:i Have Two text Box One for For Typing & second for Replacement of TextI want to Replace Text With Following:

[Code]...

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved