VS 2008 - Hashing A File - Using The SHA256 Algorithm
May 6, 2009I know I can MD5 hash a file, but how do I go about using the SHA256 algorithm?
View 6 RepliesI know I can MD5 hash a file, but how do I go about using the SHA256 algorithm?
View 6 RepliesHow can I Implement Drupal 7's Hashing Algorithm into my software so that I can make a database query that allows the user to login? I know that they use SHA-256 bit and they use Base64 encoding and a salt generating algorithm...
View 1 RepliesI've been trying to create a FCS16 (Frame-Check-Sequence) hashing algorithm, but so far the only explanation I've found is this [URL]and I'm having trouble writing the code.
View 5 RepliesI'm creating a hash with the following
vb.net
Private Function String_Hash(ByVal text As String) Dim _hash As Byte() = _enc.GetBytes(text) Dim hash_alg As HashAlgorithm = New SHA512CryptoServiceProvider() Dim _chash As Byte() = hash_alg.ComputeHash(_hash) Dim sBuilder As New StringBuilder For Each b As Byte In _chash sBuilder.AppendFormat("{0:x2} ", b) Next Return sBuilder.ToString() End Function
What's a salt?How can I add it to the code?
I want to perform two hashing operations concurrently on a single file, without reading the file twice. Is there some way to share the FileStream between two synchronized hashing threads? For example:
Dim Stream As New IO.FileStream("...", IO.FileMode.Open)
Dim HashA, HashB As Byte()
Dim A = New System.Threading.Thread(Sub()
[code]....
Maybe some way of caching a stream? Trouble is, I don't want the entire file in memory at once (it could be many gigabytes in size) and I don't want the file read more than once, due to speed issues. I want the file cached only sufficiently to ensure that both threads can work.For example, suppose at some point in time, thread A had read 100k of the file, but thread B had only read 20k of the file. The portion of the file between 20k and 100k should be cached; but then progressively forgotten as thread B catches up. Then again, if thread B is too slow, we might still end up with hundreds of megabytes being cached.Maybe thread A should be made to wait while thread B catches up. Maybe the ReadByte() function of the stream should block for a while if one of the threads is too far behind?
Im trying to make a little login app that connects to my mysql. But I cant figure out how would i salt the password then hash it?
View 5 RepliesI have created an updater for my application. When the application starts the user can launch an updater that will check for the latest version. Download it and copy the files to where the installation is.
Everything works fine.
However, I am looking for a more robust technique. And I have discovered it is better to hash the files on the web server with a hash algorithm and then when they have downloaded use the same hash algorithm to compare the hash values. If they are different either the files were corrupted when downloaded or some modified them without permission.
However, my problem is where do I store the hash values? I was thinking of hashing the files, and storing all the hash values for each file in a text file, and my updater will download that text file.
I am not sure if that is the best technique to use of not? Is this the normal and best way to do this?
I'm creating a method that I will use to hash password to store in a database. I would like to seek advice if my methods in hashing is sufficient or overkill for the task.
Dim result As Byte()
Dim mixer As String
ry
[code].....
how to store a hash in my Access Database. Now I have generated a hash by salting a user password with the User ID (not highly secure I know, but plenty for my purposes). I have also stored the hashed values in the database as Base64 strings (manually, I haven't yet developed the module to do that automatically), however, when I go to retrieve the hash from the database I receive the hex code in place of the string. This is the code for the login button:
Sub prcLogin()
'Log User in
Dim ds As New DataSet
Dim blnCorrect As Boolean
[code]....
But when I run this instead of returning a value like "rlzhYoiO4+vpdJdsrFq5Sj9VBJ+FFYhIg9V5+z+jeNI=" which I stored in the database, it returns a value like "5C6BED0D94
I need to encrypt vbs file using a cryptographic algorithm. I read about converting it into vbe file, but is there any other way to do it?
View 1 RepliesI am trying to implement an Algorithm called "Diamond-Square Algorithm" I am having trouble ending it so that it retiurns the required result. So far I have the folloiwng.
[Code]...
I am trying to pair numbers, like for a tournament. I need an idea for the algorithm to pair up the numbers, not the code, but the algorithm.
View 1 Repliespublic static string CalculateSHA1(string text, Encoding enc)
{
byte[] buffer = enc.GetBytes(text);
SHA1CryptoServiceProvider cryptoTransformSHA1 = new SHA1CryptoServiceProvider();
[code]....
VStudio keeps yelling at me for just what I have so far most specifically the bracket at the end of Byte?:
Private Sub CalculateSHA1(ByVal text As String, ByVal enc As Encoding)
Dim buffer As Byte[] = enc.GetBytes(text);
End Sub
I'm encrypting a file with AES using CryptoStream. I'm also creating a CRC32 hash of the original file data. Later I need to decrypt the file and create a CRC32 hash of the decrypted data, in order to check if the decrypted file is 100% the same as the original file.
This is a part of the encryption routine. I'm reading a file in chunks and writing them encrypted to a new file. At the same time I'm creating a CRC32 hash of the chunks of data, which will give me the CRC32 hash of the entire file in the end. This works fine.
vb.net
'// Create the CryptoStream
Dim Crypto_Stream As New CryptoStream(FS, crypto_transform, CryptoStreamMode.Write)
[code]....
I have discovered that the .Net Hashing functions, MD5, SHA1, and SHA512 (all of them probably) do not allow us to create hashes of files greatedr than 2GB in size. If I use a function like the following:
Friend
Function
HashMD5File(ByVal
[code].....
I'am making a file Shredding program do you know how can i use Gutmann Algorithm 35 Passes in my code to delete the file visual basic 2008.
View 1 RepliesI'm trying to teach myself arrays as I have not extensively worked them. So I thought of a basic program to hash the contents of an array and list the output of the array word next to the hash value of it.
[Code]...
Any example code to encrypt a string using the new ECDSA algorithm?
View 1 RepliesI have a 2D array which holds 5 students and two test results. I have initialised my array as studentTestResults(4,1) However, I am looking for a sorting algorithm which will displays the students in order of combined results when the user clicks "sort results". I have had a hard look around the net, but finding a bubble sort for a 2D array is difficult, especially as my knowledge is minimal.
[Code]...
I'm creating a Rijndael file encryption application. I will using a unique IV for each file encryption.
My question: Where is the proper place to embed the IV info?
My initial thought is to append it at the end of the file's content. Is that a good choice?
How would I "create" an algorithm and get it to encode text in a textbox?
View 3 RepliesI'll do my best to explain what the algorithm is supposed to do:There's a class 'Recipe'.ach Recipe can include other Recipes but cannot include itself or any other Recipe that includes it. So, a simple example is we have just two Recipes A & B.A,B,C(1) Recipe C Adds B(2) Recipe B Adds A(3) Recipe attempts to add C, but can't because of the relationship. C- B - A.
View 4 RepliesI'm Micah. Electrical/Electronic engineering 500 level student. I'm working on my final year project. please i need a code for the implementation of RSA algorithm in VB.NET. your assistance will be appreciated.
View 2 Repliesis the algorithm for VB editor released anywhere? because i'm trying to create my own editor that gives various options like Linking and self defined array functions (see below) such that one edit can update several others in various places, but i do still wish to have the auto formatting VB editor provides us with.an example of a self defined array function (count):we can transform this:
Public Class test
Private Shared number_of_methods As Integer = 2
Public Function get_number_of_methods_juz_an_example() As Integer
Return number_of_methods
[code]....
well of course instead of the code it would be just click and select (i wrote out the code in <> just to show what's happening)
i need some tutorial to implement BLS (Boneh-Lynn-Shacham) signature algorithm to create private key and public key to encrypt a message.I need tutorial to implement this in VB.NET.
View 1 RepliesI found an algorithm in C# that I need to convert to C. Problem is, I have never used C# so the syntax is really strange to me.
Implementation of Berlekamp-Massey algorithm for calculating linear complexity of binary sequence
s = byte array with binary sequence
returns Length of LFSR with smallest length which generates s
[Code].....
I want create my own algorithm
View 1 RepliesHow would I be able to use my own Encryption Algorithm in my program such as encrypting text. I havn't been able to figure this out.
View 1 Repliescan you write an algorithm which can calculate 500 factorial.scientific symbol(mode) is unauthorized.Answer should be in String mode.
View 1 RepliesI am using VB.NET and I am trying to come up with some algorithm or some pseudo-code, or some VB.NET code that will let me do the following (hopefully I can explain this well):I have 2 collection objects, Cob1 and Cob2. These collection objects store objects that implement an interface called ICob. ICob has 3 properties. A boolean IsSelected property, a property called Length, which returns a TimeSpan, and a Rating property, which is a short integer.
OK, now Cob1 has about 100 objects stored in the collection and Cob2 is an empty collection. What I want to do is select objects from Cob1 and copy them over to Cob2. I want the following rules obeyed when selecting the objects though:
[Code]...