Questions tagged [message-digest]
131 questions
0
votes
1 answer
Chilkat message ID generation methodology?
The Chilkat proprietary email API concocts message IDs with formats like this:
CHILKAT-MID-862e2615-b706-5239-b049-38ded70b2a77
How is that value calculated? Is that a standard unix digest of some kind, or is it an unknown code?

Tyler Durden
- 11,156
- 9
- 64
- 126
0
votes
1 answer
Java Cryptography/Security Error
I have some code below, which should create a hash of a message using SHA1, print the hash, encrypt the message using a RSA algorithm, print out the encrypted message, then decrypt the message and print the hash again. The fist and third print…

ChrisDLFC
- 215
- 4
- 9
0
votes
1 answer
Java messageDigest funky output
I'm using Java's MessageDigest to do a hashing project. I want to create collisions with hashes made by randomly generated strings. I have verified that my strings are truly random. When I output the digest however it always begins with "[B@" for…

discodane
- 1,978
- 4
- 24
- 37
0
votes
1 answer
Message Digest java
I was not aware of the MessageDigest class before. I am now trying to understand a segment of code and the documentation is not helping me much.
MessageDigest digest = Crypto.sha256();
digest.update(last.getSign());
byte[] SignHash =…

Paramar
- 287
- 1
- 5
- 22
0
votes
1 answer
Encrypting passwords in database by using SHA-256 algorithm
I'd would like to encrypt in a database the password by using SHA-256 algorithm. I have made some researches and I found out I should use MessageDigestclass to encrypt properly a string object. The problem is how should revert the hash function to…

Mazzy
- 13,354
- 43
- 126
- 207
0
votes
1 answer
Stream Closed Error Groovy
Hi I am trying to connect FTP and read a file and generate md5 checksum value for that file, but I am facing Stream Closed error. Here is my code.
import java.io.FileInputStream;
import java.security.MessageDigest;
import…

Shashank Cool
- 91
- 2
- 11
0
votes
2 answers
signature verification process in java security
I want to send a original_message between two person. let say Alice and Bob, and
I want to know if these steps are correct for verification of the signature or not
Alice hash the original_message with her PrivateKey -> h(m)
Alice cipher the hashed…

Nima Soroush
- 12,242
- 4
- 52
- 53
0
votes
4 answers
converting string to md5 gives add number of digits
I am trying to convert a String to its MD5 representation with this code:
public static void main(String[] args) throws NoSuchAlgorithmException {
String s = "oshai";
MessageDigest m = MessageDigest.getInstance("MD5");
…

oshai
- 14,865
- 26
- 84
- 140
0
votes
1 answer
What does resetting MessageDigest do?
Here is the code I'm talking about:
md.reset();
What does the reset() method do to the MessageDigest object? Why is it necessary?

user3055593
- 69
- 1
- 8
0
votes
1 answer
Bouncy Castle Getting content from signature and X509Certificate
I am very new to Bouncy Castle.I want to know is there any way using Bouncy Castle API that i can get original content if i only have signature using X509Certificate with public key.I am not finding any way as we have only public key.We don't have…

Swapnil
- 2,409
- 4
- 26
- 48
0
votes
1 answer
Regenerating SHA-1 hash not matching stored database hash
I'm trying to implement SHA1 password hashing with key-stretching combined with a UUID as a salt. The salt is stored as a column in my usersTable inside the database backend, thus each user will be generated their own unique salt.
My problem is that…

Nebri
- 773
- 2
- 8
- 21
0
votes
3 answers
Java message digest [MD5] not producing expected hash
I am trying to generate an MD5 hex hash using the following code:
String password = "password";
MessageDigest digest = MessageDigest.getInstance("MD5");
ByteArrayInputStream bais = new ByteArrayInputStream(password.getBytes());
int size =…

carlspring
- 31,231
- 29
- 115
- 197
0
votes
1 answer
url safe base64 in MySQL
Is MySQL's TO_BASE64 URL safe? Using java, I can write the following code:
import org.apache.commons.codec.binary.Base64;
public class Main {
public static void main(String[] args) {
String text = "SomeText";
byte[] input =…

pshah
- 2,052
- 1
- 21
- 40
0
votes
0 answers
DigestInputStream -> compute the hash without slowdown when the consumer part is the bottleneck
I have an application that needs to transfer files to a service like S3.
I have an InputStream of that incoming file (not necessarily a FileInputStream), and I write this InputStream to a multipart request body that is represented by an…

Sebastien Lorber
- 89,644
- 67
- 288
- 419
0
votes
1 answer
SHA_256 functions corrupting memory space
I've been trying to use the SHA_256 functions in sha256.h on a FreeBSD 9.1 system but it seems to be corrupting memory space of my program causing all kinds of manic behavior. I wrote up a quick program to just to play with those functions and still…

user1842941
- 31
- 2