Questions tagged [message-digest]

131 questions
1
vote
1 answer

Multiple stage password encryption for Java point of sale system

I started using MD5 for password encryption but I realized that once the database has been compromised, passwords can be easily decrypted using a dozen different tools. I was wondering if it would be practical to make a password encryption…
jtothebee
  • 165
  • 8
1
vote
1 answer

printing contents from MD_CTX

I am trying to understand how the hashing functions in md_rand.c works. Suppose I declare a variable MD_CTX m, and I am trying to see the contents of m after each MD_Update function. MD_Init(&m); printf("%X\n",*(&m)); MD_Update(&m,(unsigned char…
1
vote
1 answer

SHA 256 from Java to C#

I´m trying to create the equivalent code from Java to C# for the function below: public static String SHA256 (List parametros, String clave) { try { MessageDigest sha = MessageDigest.getInstance("SHA-256"); for(String…
Ernesto Rodriguez
  • 257
  • 2
  • 9
  • 26
1
vote
1 answer

Java MessageDigest MD5 Not Returning Expected Outcome

I got extremely bored so I'm making an experimental Brute Forcer. I'm having some issues with MD5 however. I'm getting two very different outputs, 1aabac6d068eef6a7bad3fdf50a05cc8 -7d881f6ef28afe6a4bb78689e91f6e53 The first one is valid and is dd,…
Spedwards
  • 4,167
  • 16
  • 49
  • 106
1
vote
1 answer

Threshold function generating for Image Steganography

I'm working on a project in C# by implementing a research paper.Now I'm having problems and I sent a mail with this image to both writer but no one is replying Any Suggestion of digest algorithm to calculate threshold? and also having difficult in…
Sameer Azeem
  • 548
  • 2
  • 9
  • 22
1
vote
1 answer

MD5 results are different between DigestUtils and MessageDigest

I have tried to use java.security.MessageDigest or org.apache.commons.codec.digest.DigestUtils to do md5, but there comes out different results. The sample code as below: public static void main( String[] args ) { …
Bruce
  • 647
  • 2
  • 12
  • 30
1
vote
0 answers

SAML assertion signature validation, Expected and Actual digest does not match

I am trying to validate an assertion signature received from an IDP. It results in a failure with following error : Verification failed for URI "#_7e59add4-11a0-415f-85a3-6f493110d198" Expected Digest:…
1
vote
1 answer

DigestOutputStream not reporting the correct digest value

I have the following inside a unit test to try and figure out why my DigestOutputStream is not calculating the correct digest for a test .jpg I have in the classpath. The assertArrayEquals() passes but the final assertEquals() fails with different…
user177800
1
vote
4 answers

Is it possible to limit the hashcode into specific number of characters in Java

I have written a method to convert a plain text into it's hashcode using MD5 algorithm. Please find the code below which I used. public static String convertToMD5Hash(final String plainText){ MessageDigest messageDigest = null; …
нαƒєєz
  • 1,239
  • 4
  • 17
  • 27
1
vote
1 answer

MD4 openssl core dumped

I recently tried to do a MD4 hashing with openssl in C: MD4 hash with openssl, save result into char array. I would like to do it again but now using EVP_Digest. But with this code Im getting core dumped - why? #include #include…
yak
  • 3,770
  • 19
  • 60
  • 111
1
vote
2 answers

MD5 Message Digest Java

I'm trying to convert two strings from an String List into MD5 message digests. My String List is called "usernamepassword". try { MessageDigest mdg = MessageDigest.getInstance("MD5"); …
David Jackson
  • 31
  • 2
  • 6
1
vote
1 answer

openssl digest different in c compared to java

Following is the code which is part of the DigitalSigning Handler final String NAMESPACEURI_WSSECURITY_WSU= "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"; final String NAMESPACEURI_WSSECURITY_WSSE = …
Adnan Akbar
  • 718
  • 6
  • 16
1
vote
1 answer

Illegal block size exception while decrypting the encrypted message digest

I want to decrpyt the encrypted message digest. i hav this code in my java program: String bobSignedMsg = SignedMsg; //At the receiving end, Bob extracts the msg // length, the msg text, and the digital // signature from the signed…
Binay
  • 149
  • 1
  • 3
  • 12
1
vote
1 answer

Hashing using salt on android and iphone

I am developing an app on both android and iphone which requires encryption of some data. I want to know is there any way to encrypt data producing same hash on both platform. I have common salt, just wanted to have same encrypted data output from…
nishi
  • 1,245
  • 3
  • 13
  • 22
1
vote
1 answer

How does SDK or ADT generate SHA1-Digest for Resources of Android application packages

In a signed apk, there would be a META-INF/MANIFEST.MF file. And in this file, we can find the digests like these: Name: res/layout/main.xml SHA1-Digest: NJ1YLN3mBEKTPibVXbFO8eRCAr8= Name: AndroidManifest.xml SHA1-Digest:…
hardPass
  • 19,033
  • 19
  • 40
  • 42
1 2 3
8 9