hash

Windows Hashed Password

Hi, Is there a way to get the hashed value of Windows password for a specific local user? Which Win32 API would that be? I don't want to know what the actual password is, just the hash value of the password. I'd like to be able to tell which workstations/servers don't have the same password for a specific user. Please advise, thanks...

Analog of Glib quarks on Mac OS.

Maybe you know any analogs of g_quark_from_string() and g_quark_to_string() in CoreFoundation or other frameworks? ...

PHP function to create 8 chars long hash ([a-z] = no numbers allowed)

I need PHP function that will create 8 chars long [a-z] hash from any input string. So e.g. when I'll submit "Stack Overflow" it will return e.g. "gdqreaxc" (8 chars [a-z] no numbers allowed) ...

array to hash in perl

I have a source list from which I am picking up random items and populating the destination list. The item that are in the list have a particular format. For example: item1{'name'} item1{'date'} etc and many more fields. while inserting into the destination list I check for unique names on items and insert it into that list. For this...

Dilemma, searching a hashed field when no other information is known

I'm having a dilemma. I have a field hashedX that is a hashed/salted value and the salt is saved in the same row in the mysql database as is common practice. hashedX saltX ------ ------ hashed1 ssai3 hashed2 woddp hashed3 92ofu When I receive inputX, I need to know if it matches any of the values in hashedX s...

Shift js string one character

In PHP, it's pretty simple, I'd assume, array_shift($string)? If not, I'm sure there's some equally simple solution :) However, is there any way to achieve the same thing in javascript? My specific example is the pulling of window.location.hash from the address bar in order to dynamically load a specific AJAX page. If the hash was "2"...

How to modify Hash to enable access of element 'hash[:a][:b]' by shorter 'hash[:a,:b]' in Ruby?

I would be happy to access any element of multi-dimensional hash-array by a shorter expression h = {a: {b: 'c'}} # default way p h[:a][:b] # => "c" # a nicer way p h[:a,:b] # => "c" # nice assignment h[:a,:b] = 1 p h # => {:a=>{:b=>1}} I realize that in this way one eliminates the possibility to have a hash key being an array. {[...

[C#] Different SHA1 Hash result between Java and C#

Hi guys, I've a big problem. I using this C# function to encode my message: byte[] buffer = Encoding.ASCII.GetBytes(file_or_text); SHA1CryptoServiceProvider cryptoTransformSHA1 = new SHA1CryptoServiceProvider(); String hashText = BitConverter.ToString(cryptoTransformSHA1.ComputeHash(buffer)).Replace("-", ""); On java side, I use this ...

Perl - Hash of hash and columns :(

Hi folks, I've a set of strings with variable sizes, for example: AAA23 AB1D1 A1BC AAB212 My goal is have in alphabetical order and unique characters collected for COLUMNS, such as: first column : AAAA second column : AB1A and so on... For this moment I was able to extract the posts through a hash of hashes. But now, how can I ...

perl sort key then by subkey--if subkey undef set to null string

my %data ( KEY1 => { SUBKEY1 => "Canada", SUBKEY3 => "75.00", SUBKEY2 => "50.00", }, KEY3 => { SUBKEY2 => "150.00", }, KEY2 => { SUBKEY3 => "200.00", SUBKEY1 => "Mexico", }, ); How do I print a list that is sorted by Keyname and for each keyname sorted by subke...

Converting an object to a hash of values in Ruby

i have searched around, but can't find any built-in way to do convert an object (of my own creation) to a hash of values, so must needs look elsewhere. my thought was to use .instance_variables, strip the '@' from the front of each variable, and then use the attr_accessor for each to create the hash. what do you guys think? is that th...

Using hyphen in link_to property?

In my Rails app, I need to set a value for a custom data-* attribute on an anchor tag. However, hashes can't have hyphens if I'm not mistaken. I essentially want to do this: <%= link_to 'Example', example_path, :class => 'something', :data-id => '15' %> :data-id is not valid, however. What can I do to work around this? ...

hash function for src dest ip + port

So, I am looking at different hash functions to use for hashing a 4 tuple ip and port to identify flows. One I came across was ((size_t)(key.src.s_addr) * 59) ^ ((size_t)(key.dst.s_addr)) ^ ((size_t)(key.sport) << 16) ^ ((size_t)(key.dport)) ^ ((size_t)(key.proto)); Now for the world of me, I cannot expla...

Perceptual Hash Algorithms in Python or PHP?

I've been exposed via StackOverflow to pHash, a C++ perceptual hash library for audio, video, images, and text fingerprinting - recently with preliminary bindings for PHP, C# and Java. I'm interested in studying these algorithms and I'm wondering if there are any open-source pure Python or PHP implementations of the same / similar algor...

disable character escaping in to_json / Hash.from_xml

I try to implement an api for a projekt and found this article http://www.coffeepowered.net/2009/02/16/powerful-easy-dry-multi-format-rest-apis-part-2/ So i get a xml.builder template to build my response and render it to json. It works great, but I have some utf-8 encoded Data I want to respond. First I specify the xml encoding. Next...

Changing hash of a files

Hi guys I have a folder full of binary files and I want to make a change to these files so that the hash of these files will change. I want to do this is a fashion that doesn't pertinently corrupt the files. Meaning that the change should still allow the file to operate normally or that I should be able to undo the change at any point ...

md5 hash for urls in unique Index

I was asked this before with slight different with current question. but did not got the answer I was looking into. My question is do I need to store md5($url) in unique index in MySQL?? I have seen this in some code actually I don't remember..this is a large database with more than 5 million urls and the indexing is done by calling url...

would there be any reason to hash a GUID?

would there be any reason to hash a GUID? ...

how does youtube know that you uploaded the same video?

do they store the hashes of the videos and then compare them? how do they know that you had already uploaded that video? there are plenty of videos on you tube that have the same file name and file size. ...

hash function to index similar text

I'm searching about a sort of hash function to index similar text. So for example if we have two very long text called "A" and "B" where A and B differ not so much, then the hash function (called H) applied to A and B should return the same number. So H(A) = H(B) where A and B are similar text. I tried the "DoubleMetaphone" (I use ital...