I have:
const unsigned int hash_1 = 0xaf019b0c;
const unsigned int hash_2 = 0xf864e55c;
const unsigned int hash_3 = 0xfaea8ed5;
Hashes come from an automatically generated header. These hashes are indirectly associated with tags 1, 2, 3. The tags are associated with classes through a simple compile-time generated id. That way I can ...
Hi,
I need to examine the output of a certain script 1000s of times on a unix platform and check if any of it has changed from before.
I've been doing this:
(script_stuff) | md5sum
and storing this value. I actually don't really need "md5", JUST a simple hash function which I can compare against a stored value to see if its changed....
I would like to put use a string* as a key in an unordered_list. I do not want the hash the pointer itself but the string it points to.
I understand I need to create a struct like this:
struct myhash{
size_t operator()(const string * str){
return hash(*str);
}
}
and send it as a a hasher to the map template, but i am ...
I think I've just been looking at this too long. I have some data that looks like this:
@a = (
{ name => 'ethan', depth => 0 },
{ name => 'victoria', depth => 1 },
{ name => 'stephen', depth => 2 },
{ name => 'christopher', depth => 3 },
{ name => 'isabella', depth => 2 },
{ name => 'ethan', depth => 3 },
{ ...
I am a perl person and I have made hashes like this for awhile:
my %date;
#Assume the scalars are called with 'my' earlier
$date{$month}{$day}{$hours}{$min}{$sec}++
Now I am learning ruby and I have so far found that using this tree is the way to do many keys and a value. Is there any way to use the simple format that I use with pe...
hey,
i know it's not possible to get the hashvalue of an url with php, cause it's already executed on the server, but is it possible to write a hashvalue to a url with php like you can do with javascript?
regards matt
...
For example: Once a user logged in, server side then needs to route the http traffics to a certain tomcat instance because all his/her files(not in DBMS but in local HD) stored on that machine and there will be interactions between the web app and underlying FS. Anyway to do this?
Thanks!
...
Hi. I'm trying to implement HMAC-SHA1 algorithm in my C++/Qt application.
I have a method for Sha1 algorithm available, I just need to understand the HMAC part of it.
This pseudocode is from wikipedia:
1 function hmac (key, message)
2 if (length(key) > blocksize) then
3 // keys longer than blocksize are shortened
4 ...
HashMap contains a hash-table which is an array that hold the values
as I understood the hash-table has an initial size, yet it can get increased after many invocation of put() (depends on the load-factor)
anyhow I wonder how can you find a value after you change the size of the hash-table because I know that in order to calculate the ...
Using SQL Server Integration Services (SSIS) to perform incremental data load, comparing a hash of to-be-imported and existing row data. I am using this:
http://ssismhash.codeplex.com/
to create the SHA512 hash for comparison. When trying to compare data import hash and existing hash from database using a Conditional Split task (expres...
I would like to create a data structure or collection which will have O(1) complexity in adding, removing and calculating no. of elements. How am I supposed to start?
I have thought of a solution: I will use a Hashtable and for each key / value pair inserted, I will have only one hash code, that is: my hash code algorithm will generate ...
I had an idea about hashed passwords and salt values. Since I'm rather new to hashing and encryption, I thought I'd post this to you. Would it be more secure to generate a unique salt for each user account, then store the salt and hashed values in the database? Or, keep a single salt value securely stored and re-use that each time I h...
What's the most concise way to determine if @hash[:key1][:key2] is defined, that does not throw an error if @hash or @hash[:key1] are nil?
defined?(@hash[:key1][:key2]) returns True if @hash[:key1] exists (it does not determine whether :key2 is defined)
...
I am wondering how to create forgiving dictionary (one that returns a default value if a KeyError is raised).
In the following code example I would get a KeyError; for example
a = {'one':1,'two':2}
print a['three']
In order not to get one I would 1. Have to catch the exeption or use get.
I would like to not to have to do that with m...
I'm in the process of migrating an application from .Net forms to MVC. The application currently uses a custom membership provider and I would like to convert it to use the SQL Membership provider. I'm hoping to use the current user passwords as is.
The "old" application uses "ComputeHash" in System.Security.Cryptography.SHA1CryptoSer...
I have two arrays
a = [:foo, :bar, :baz, :bof]
and
b = ["hello", "world", 1, 2]
I want
{:foo => "hello", :bar => "world", :baz => 1, :bof => 2}
Any way to do this?
...
I have designed an user interface for a tool where the user needs to enter a "Name" which is maximum 300 characters long, and the tool generates a text file ("Name".txt) which is then uploaded to a "server" (Mainframe and Unix). I want to shorten the 300 character string into a uniquely identifiable 8 character string (because of issues ...
Hi.
I'm trying to add an 'active' class to a particular element based on the URL hash but it's not working as I expect.
Here's my code:
var hash = window.location.hash.substr(1);
if(hash != false) {
$('.products #copy div, #productNav li a').removeClass('active');
$('.products #copy div#'+hash+'').addClass('active');
$('...
Has anyone ever tried to use SHA-256 or SHA-512 with PEAR AUTH?
MD5 works perfectly however, nothing happens when you set the cryptType to
'cryptType' => 'sha256'
The page will just reload. I'm using MDB2 With this.
Code is here: http://pastie.org/1065896
...
Although algorithmic security is normally to be avoided, I'm interested in a means for agent / client software (running on Windows under the local system account) to authenticate itself to a REST web service:
without relying on PKI
without relying on the user's account (agent code is "local system")
In short, I'm attempting cheaply t...