tagged [hash]

Is a Python dictionary an example of a hash table?

Is a Python dictionary an example of a hash table? One of the basic data structures in Python is the dictionary, which allows one to record "keys" for looking up "values" of any type. Is this implemen...

How do I loop over a hash of hashes?

How do I loop over a hash of hashes? I have this hash: How do I access the separate values in the value hash on the loop?

16 Dec at 10:54

TypeError: unhashable type: 'dict', when dict used as a key for another dict

TypeError: unhashable type: 'dict', when dict used as a key for another dict I have this piece of code: When I run that code, I get this error: > TypeError: unhashable type: 'dict' What is the cause o...

5 Jan at 12:18

Hashing with SHA1 Algorithm in C#

Hashing with SHA1 Algorithm in C# I want to hash given `byte[]` array with using `SHA1` Algorithm with the use of `SHA1Managed`. The `byte[]` hash will come from unit test. Expected hash is `0d71ee447...

7 Jan at 21:32

How can I print the contents of a hash in Perl?

How can I print the contents of a hash in Perl? I keep printing my hash as # of buckets / # allocated. How do I print the contents of my hash? Without using a `while` loop would be most preferable (fo...

24 Apr at 10:16

Append key/value pair to hash with << in Ruby

Append key/value pair to hash with

3 Nov at 18:3

Fixed Length numeric hash code from variable length string in c#

Fixed Length numeric hash code from variable length string in c# I need to store fixed-length (up to 8 digits) numbers produced from a variable length strings. The hash need not be unique. It just nee...

13 Feb at 23:57

Why does C# generate different EXEs for the same source-code?

Why does C# generate different EXEs for the same source-code? Every time we recompile our C# application we end up with EXEs with different MD5 signatures. We are recompiling on the same machine, minu...

Is it safe to store passwords hashed with MD5CryptoServiceProvider in C#?

Is it safe to store passwords hashed with MD5CryptoServiceProvider in C#? We are storing hashed passwords in a database table. We prepend each password with a random salt value and hash using MD5Crypt...

24 Feb at 21:17

.NET implementation of scrypt

.NET implementation of scrypt I've read about [scrypt](http://www.tarsnap.com/scrypt.html) and some of its advantages over the [bcrypt](http://en.wikipedia.org/wiki/Bcrypt) hashing algorithm in certai...

1 Dec at 00:54

What does hash do in python?

What does hash do in python? I saw an example of code that where `hash` function is applied to a tuple. As a result it returns a negative integer. I wonder what does this function do? Google does not ...

5 Nov at 16:5

Algorithm to compare two images in C#

Algorithm to compare two images in C# I'm writing a tool in C# to find duplicate images. Currently I create an MD5 checksum of the files and compare those. Unfortunately, the images can be: - - - [](h...

8 Mar at 18:45

How to add new item to hash

How to add new item to hash I don't know how to add new item to already existing hash. For example, first I construct hash: After that, I want to add item2, so after this I have hash like this: I don'...

29 Dec at 01:23

How to create simple short hash value? C#

How to create simple short hash value? C# How to create simple hash value? For example I have string "TechnologyIsCool" and how to have hash value from this string? I want to do some method like: and ...

16 May at 10:22

MD5 hash with salt for keeping password in DB in C#

MD5 hash with salt for keeping password in DB in C# Could you please advise me some easy algorithm for hashing user password by MD5, but with for increasing reliability. Now I have this one: ``` priva...

6 Jun at 09:48

Can I depend on the values of GetHashCode() to be consistent?

Can I depend on the values of GetHashCode() to be consistent? Is the return value of GetHashCode() guaranteed to be consistent assuming the same string value is being used? (C#/ASP.NET) I uploaded my ...

9 Sep at 22:54

Will string.GetHashCode() return negative value?

Will string.GetHashCode() return negative value? I tried with batch of random strings, all values I got are positive, but I wondering: Will `String.GetHashCode()` return negative or 0? Since the retur...

31 Jan at 18:17

Is the value returned by ruby's #hash the same across interpreter instances?

Is the value returned by ruby's #hash the same across interpreter instances? Is the value returned by ruby's #hash the same across interpreter instances? For example, if I do `"some string".hash`, wil...

25 Nov at 15:39

Best hashing algorithm in terms of hash collisions and performance for strings

Best hashing algorithm in terms of hash collisions and performance for strings What would be the best hashing algorithm if we had the following priorities (in that order): 1. Minimal hash collisions 2...

14 Apr at 19:56

C# 4.0 How to get 64 bit hash code of given string

C# 4.0 How to get 64 bit hash code of given string I want to get 64 bit hash code of given string. How can i do that with fastest way ? There is a ready method for get 32 bit hash code but i need 64 b...

11 Jan at 14:20

encrypt and decrypt md5

encrypt and decrypt md5 I am using code `$enrypt=md5($pass)` and inserting `$encrypt` to database. I want to find out a way to decrypt them. I tried using a decrypting software but it says the hash sh...

2 Jan at 13:42

C#: How to generate short MD5 code?

C#: How to generate short MD5 code? When I am encrypting `23` using MD5 encryption I am getting `37693cfc748049e45d87b8c7d8b9aacd` this 32-character long string which will always be static for 23. I w...

10 Aug at 10:19

What is Hash and Range Primary Key?

What is Hash and Range Primary Key? I am not able to understand what Range / primary key is here in the docs on [Working with Tables and Data in DynamoDB](https://docs.aws.amazon.com/amazondynamodb/la...

How do I create an MD5 hash digest from a text file?

How do I create an MD5 hash digest from a text file? Using C#, I want to create an MD5 hash of a text file. How can I accomplish this? Thanks to everyone for their help. I've finally settled upon the ...

13 Jun at 07:4

Hashing passwords with MD5 or sha-256 C#

Hashing passwords with MD5 or sha-256 C# I'm writing a register form for a application but still having problems with being new to c#. I am looking to encrypt/hash passwords to md5 or sha-256, prefera...

1 Dec at 22:45