Questions tagged [digest]

also known as a hash value. Used as a key to distinguish the resources (file, uri, etc.) generating the unique key for them - digest (hash).

Digest also known as a hash value or key in software development, computer and engineering fields.

Used as a key to distinguish the resources (file, uri, etc.) generating the unique key for them - digest (hash). Hashes can be generated from variable length content with variety of methods (sha1, md5, crc32 and others) and represent fixed length generated value.

Resources:

439 questions
195
votes
1 answer

Different results with Java's digest versus external utilities

I have written a simple Java class to generate the hash values of the Windows Calculator file. I am using Windows 7 Professional with SP1. I have tried Java 6.0.29 and Java 7.0.03. Can someone tell me why I am getting different hash values from…
Mike Viens
  • 2,467
  • 3
  • 19
  • 23
87
votes
8 answers

Method not found using DigestUtils in Android

I am trying to use the library DigestUtils in Android 2.3.1 using JDK 1.6, however I get the following error when executing the app: Could not find method org.apache.commons.codec.binary.Hex.encodeHexString, referenced from method…
Caumons
  • 9,341
  • 14
  • 68
  • 82
83
votes
1 answer

RoR - MD5 generation

How can I encrypt a string with MD5 in Rails 3.0 ? pass = MD5.hexdigest(pass) in a model yields uninitialized constant MyModel::MD5
Mithun Sreedharan
  • 49,883
  • 70
  • 181
  • 236
56
votes
4 answers

How can I calculate the SHA-256 hash of a string in Android?

I'm trying to get the SHA256 of a string in Android. Here is the PHP code that I want to match: echo bin2hex(mhash(MHASH_SHA256,"asdf")); //outputs "f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b" Now, in Java, I'm trying to do…
Eamorr
  • 9,872
  • 34
  • 125
  • 209
50
votes
5 answers

What are the chances that two messages have the same MD5 digest and the same SHA1 digest?

Given two different messages, A and B (maybe 20-80 characters of text, if size matters at all), what is the probability that the MD5 digest of A is the same as the MD5 digest of B and the SHA1 digest of A is the same as the SHA1 digest of B? That…
John Siracusa
  • 14,971
  • 7
  • 42
  • 54
49
votes
6 answers

Creating an md5 hash of a number, string, array, or hash in Ruby

I need to create a signature string for a variable in Ruby, where the variable can be a number, a string, a hash, or an array. The hash values and array elements can also be any of these types. This string will be used to compare the values in a…
TelegramSam
  • 2,770
  • 1
  • 17
  • 22
43
votes
3 answers

Why doesn't my newly-created docker have a digest?

I have been following the Docker tutorial here, and built a test image on my local OSX machine by committing changes to an existing image and tagging it with three different labels: # docker images REPOSITORY TAG IMAGE…
Adam Matan
  • 128,757
  • 147
  • 397
  • 562
38
votes
11 answers

Get MD5 String from Message Digest

I understand how it works but if I want to print out the MD5 as String how would I do that? public static void getMD5(String fileName) throws Exception{ InputStream input = new FileInputStream(fileName); byte[] buffer = new byte[1024]; …
Tom
  • 765
  • 2
  • 8
  • 8
27
votes
4 answers

XML Signature: How to calculate the digest value?

I have an XML like this A B C
user252816
  • 563
  • 4
  • 12
  • 21
24
votes
3 answers

HTTP Digest Authentication versus SSL

What is the difference between HTTP Digest Authentication and SSL from a performance, security and flexibility point of view?
Gili
  • 86,244
  • 97
  • 390
  • 689
22
votes
4 answers

Example of SOAP request authenticated with WS-UsernameToken

I'm trying to authenticate a SOAP request using WS-UsernameToken spec, but the target device is always denying access. My non-working request looks like this. (The password I'm trying to hash is system.)
che
  • 12,097
  • 7
  • 42
  • 71
21
votes
2 answers

Why do the hash values differ for NaN and Inf - Inf?

I use this hash function a lot, i.e. to record the value of a dataframe. Wanted to see if I could break it. Why aren't these hash values identical? This requires the digest package. Plain text output: > digest(Inf-Inf) [1]…
King_Cordelia
  • 223
  • 1
  • 7
19
votes
1 answer

Can I prevent / delay the AngularJS $digest from happening when model is updated

Is there a way to postpone or delay a digest from happening? I have a bunch of changes that I want to make to a model but I don't want the digest to fire until all changes to the model were made. Some of the objects on the model have watchers that…
Brad8118
  • 4,672
  • 11
  • 36
  • 48
16
votes
1 answer

Counting Angular's $digest Cycles

tl;dr: I want to have angular trigger css animations on page load. Is there a way to count angular's digest cycles within say, a controller or directive? long version: I have some angular animations which I want to run when the page loads, using…
mmm
  • 2,272
  • 3
  • 25
  • 41
16
votes
2 answers

HTTP Digest Authentication

I want to use HTTP Digest Authentication with a central database that stores usernames and encrypted passwords. These data should be used by different servers like Apache httpd or Tomcat for example. The clients will be humans with browsers and…
deamon
  • 89,107
  • 111
  • 320
  • 448
1
2 3
29 30