Encrypting Strings With SHA1?

Jul 18, 2009

how to encrypting strings with SHA1, but all of the code I have found does not work or it is to complex for my program. I have found a website that has a encrypting demo program. It worked well so I email the programmer and he gave me this code.

[Code]...

View 8 Replies


ADVERTISEMENT

Generate MD5 And SHA1?

May 26, 2011

I'm using the below function to generate an MD5SH1 hash for SQL backup files.This works well, has progress report etc but is slow if using large files.

Could I generate the MD5 at the same time as SH1 rather than having to process the file twice, doubling the time taken? What about converting an MD5 result to SHA1?

Imports System
Imports System.IO
Imports System.Security.Cryptography
Imports System.Text

[Code]...

View 1 Replies

Creating An SHA1 Generator In VB?

Jun 21, 2010

I've been trying to work on a personal project, in which the user enters in a text string in the first text box, and when the user clicks the "encrypt" button, the SHA1 hash of the text appears in the next text box. I've googled around for some information on this, and haven't found much for Windows Forms and SHA1, only MD5. I've checked a lot of things on MSDN but to no avail.

View 1 Replies

Key - Decrypt A SHA1 String

Jan 26, 2011

Is it possible to decrypt a SHA1 string in VB.Net, knowing the key? I have seen "decryption" of credentials before, however - in Java: [URL]

View 3 Replies

Different SHA1 Hash Values Obtained From PHP?

Sep 7, 2011

I have some problems with the SHA1 hash value of a string. I'm trying to send a file from a client written in VB.net to a server written in PHP. My problem is that when I pass the same string to VB.net and PHP, the SHA1 value calculated by VB.net is completely different from the value calculated by PHP.

For example, I want to encode a string in Base64 and then calculate the SHA1 Hash of the Base64 string. When the computer executes this task from the vb.net version and from the PHP version I get two different SHA1 values, even if apparently the Base64 encoded string is the same:

VB.net: 2E97A53B09C482A831540B532845BCAC79BFACCF
PHP: 350A2080264E2724D4BCBC521C35264D264A1DAF

I'm surely missing something, could you point me in the right direction and tell me what I'm doing wrong here?

[Code]...

View 1 Replies

Generate MD5 And SHA1 Hash For File?

May 26, 2011

I'm trying to generate an MD5 and SHA1 hash value for a given file with the following:

Imports System
Imports System.IO
Imports System.Security.Cryptography
Imports System.Text

[Code]...

View 11 Replies

Change The Keysize And Maybe Even Choose Between MD5 And SHA1 Encryption

Feb 2, 2012

Here is some code that I have that works perfectly:

[Code]...

Is it possible to change the keysize and maybe even choose between MD5 and SHA1 encryption with this code? If not, can someone point me in the right direction to find some that does?

View 1 Replies

Way To Concatenate List Of Strings Into A Comma-separated Strings, Where Strings Are Members Of An Object?

Oct 16, 2009

Say I have a List(Of Tag) with Tag being an object. One member of Tag, Tag.Description, is a string, and I want to make a comma-separated concatenation of the Description members.Is there an easier way to do this than to read the Description members into a List(Of String) and then use the Join function?

View 2 Replies

Encrypting A Text In .net?

Mar 29, 2010

I am new to .net classes and i would like to know how can i encrypt a text with AES256 algorithm.

View 3 Replies

Encrypting Data With RSA In .NET

Apr 8, 2012

I have a DER file with sha1RSA as the Signature Algorithm. I have to encrypt some data using it.Can anyone tell me how do I load the DER file and use the RSA public key in it to encrypt my data in .NET?

View 1 Replies

C# - Encrypting A Private Key With BouncyCastle?

May 19, 2012

I'm using the .NET version of BouncyCastle, and I have to save a private RSA key to file, obviously encrypted with a password for security reasons.What I'm trying right now is this:

Dim rand As New SecureRandom
Dim arr As Byte() = New Byte(7) {}
rand.NextBytes(arr)

[code].....

But BouncyCastle is thwrowing a NullReferenceException on the last instruction. Since the method is totally undocumented >:( I wonder if any of you know how to use it correctly...

View 1 Replies

C# - How To Stop Asp.net Encrypting The Querystring

May 11, 2011

I have a requirement where I have to pass some values into the next page via querystring.This querystring is coming from third party and they need to have it on the otherpage for some analysis. I just do a response.redirect and add the querystring that i recieve from them to the other page. My problem is that the .net environment is encoding/encrypting some of the special characters used by them which I dont want as it does not bring back the correct values in the new page.

[Code]...

View 2 Replies

Encrypting And Decrypting A Text?

Dec 11, 2009

There are many algorithms for encryption in internet. But i found them more complex. I want simple and powerful algorithm for encryption and decrytion of text.

View 13 Replies

Encrypting And Decryption A File

Sep 20, 2011

I am actually really new to VB and C#. From numerous tutorials that i found online i was able to create a small program that will encrypt a file. However I am having a really hard time decrying it back.[code]All I am trying to do is to create a program that will decrypte these file with an upload button. Our system encrypts the files to prevent operators from changing the results, we need to trend the data. However it will take way to long to use the online tool provided with the software. A desktop tool will save us much more time. The files generated are 70mb and up.

View 15 Replies

Encrypting File Using AES 128 And Securestring?

Oct 24, 2009

Im trying to create an encrypted file using a secure string and the AES128bit managed class to encrypt some data to a file.I have read many variations on the forums on how to do this but everyone seems to do it slightly differently. Ive created the below function and just wanted to confirm that this is the correct way to go about it.

[Code]...

View 4 Replies

Encrypting Texts With Password?

Feb 26, 2012

I heared about an encrypting function that encrypt the texts with a password I don't know exactly how it

View 6 Replies

Encrypting/Decrypting An Image?

Nov 22, 2011

Im a Uni student and im having probs with encrypting an image and also the contents of a folder. I have successfully encrypted and decrypted a text file using the following code below.

If anyone could take a look and advise on how to alter my code to perform the task of selecting an image or folder and encrypting it and decrypting it via a secret key that you input within a textbox,

[Code]...

View 7 Replies

Serialization And Encrypting Files?

Jan 15, 2010

what the relation between Serialization and encrypting files, i wanna know that and i wanna a lessons for serialization and i want to ask about this code in VB6 if we can convert it to VB.net 2008

Dim a As String * 10
Dim b As String * 10
Dim c As String * 10

[code]....

View 1 Replies

VS 2008 Encrypting .pdf Files

Aug 9, 2009

how I can encrypt .pdf files? I haven't been able to find something that will give me an idea of how to do it.

View 4 Replies

.net - Encrypting Multiple Elements Of One Xml Document?

Aug 25, 2010

I managed encrypting an xml document by encrypting an element and then replacing the element with the encrypted data. A shown in the sample code below. Public Shared Sub Encrypt(ByVal textReader As TextReader, ByVal textWriter As TextWriter, ByVal certificateName As String)

[Code]...

View 1 Replies

Asp.net - Encrypting Parameters Of A Querystring Via Javascript

Feb 23, 2012

I want to redirect to some page with querystring,and the querystring value should be in encrypted format and i want to decrypt that in codebehind

example:

function redirect(s, e) { window.location.href = "Default2.aspx?Id=" + encrypt(5)+ "&No=" +encrypt( 5);}

and in codebehind:

Dim id As String = Request.QueryString("Id").ToString()
id = Decode(id)
Dim no As String = Request.QueryString("No").ToString()
no= Decode(no)

View 1 Replies

Encrypting Configuration File Using RSAProtectedConfigurationProvider?

Mar 6, 2009

I finally managed to encrypt the user settings in my app.config with the following

[code].....

View 3 Replies

Encrypting Data Using A Binary Formatter

Aug 20, 2009

I am currently using a binary formatter to serialize/deserialize some data objects. Some of the properties in the classes are Strings. When the data is written you can open the file with a text editor and can see the raw String data. Is there any way to encrypt the Strings or the entire object before it is serialized? I have looked at this thread here [URL] but the code is in C# and the free converters I tried for some reason did not like the code. This is the code I am using currently.

[Code]...

View 1 Replies

Encrypting Sensitive Info In Program?

Oct 9, 2009

I was wondering, i have smtp mail adress and password (for gmail*) and it is probably very easy to read it when opened with hex editor or decompiled so i want to encode/crypt that info in my program to make it almost (i know it isnt possible to make it fully unreadable) unreadable and/or make my program undecompilable

View 8 Replies

Encrypting Serialized Data Files?

Feb 26, 2009

i would like to encrypt my data files, which are serialized object files. is there a simple way to do this that will work trouble free on both windows xp and vista?

my environment: windows xp pro (sp3), visual studio 2008 pro, (sp1, sdk 1.1)

View 2 Replies

Encrypting/Decrypting Files With Basic?

Jul 12, 2011

I'm writing a program in Basic where users can select a File using OpenFileDialog, then using a Dialog with two textboxes as the way to set the password to encrypt a file. I'm having trouble getting the program to require the password to open the file.

View 5 Replies

Encrypting/Decrypting From A Text File?

Sep 13, 2011

I have a program and I want to make it so you need a specific key to use it. I want to store keys in a text file and also use encrypt strings from my program to a text file.

I'm using Visual Studio 2010 Ultimate and programming in Visual Basic

View 1 Replies

SQL Server - Encrypting License Info

Jun 26, 2011

I need to Encrypt my license info and put in the Sqlserver, while user login I need to decrypt the license info and need to check the license. Is there any strong Encryption is available in .net framework 4?

View 1 Replies

Using Rijndael (as AES Algorithm) For Encrypting - Symmetric Key

Sep 13, 2011

Im using Rijndael (as AES algorithm) for encrypting. I encrypt the values (objects properties) and serialize the object to xml an dsend the xml to the receiver via a web service. I want to pass along the encrypted symmetric key that I used to encrypt the data. But what key should I pass along?

My decryption algorithm looks like this (vb.net):

CODE:

If I want to decrypt the encrypted string I have to use both key and IV, but I think I have to pass along only a key value. Do I have to do this another way or what should I pass along? My specification says that the values have to be encrypted using AES and a 128 bits key.

View 2 Replies

VS 2010 - Code For Encrypting A File

Feb 26, 2012

Here is my code for encrypting a file:

Public Shared Function AESFileEncrypt(inputFilename As String, outputFilename As String) As Boolean

'Create SymmetricAlgorithm object and specify the Key and IV.
Dim AES As RijndaelManaged = New RijndaelManaged

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

This happens with large files. I gather that I have to use a fixed size buffer and read the file in small chunks, copying those chunks from the input to the output stream, until I reach the end of the input file.

View 11 Replies







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