02-08-2007
md5
When I compile this code I get errors:
undefined first referenced
symbol in file
MD5Init mddriver.o
MD5Update mddriver.o
MD5Final mddriver.o
i386ld fatal: Symbol referencing errors. No output written to a.out
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a script that runs the grub-md5-crypt command based on whether the pass_value variable is a non-zero string. The md5 hash is being created in the /opt/hostconfigs/$HOST file, but I can't echo $md5_value. It is blank. Is there a way to create and echo a md5 hash variable?
if
then... (1 Reply)
Discussion started by: cstovall
1 Replies
2. Shell Programming and Scripting
I have a little problem. To keep a configuration simple, I've exceeded my perl knowledge. :-) I've worked with multi-dimentional arrays before, but this one has me beat:
@info = (
{
'defval' => 'abc'
'stats' = (
{ 'name' => 'a', },
{ 'name' =>... (1 Reply)
Discussion started by: jsmoriss
1 Replies
3. Programming
hi
i want to generate MD5 hash of string in unix (hp) i have the algorithm which takes file as argument and returns hash of file but when i tried to generate hash of "a" result was "60b725f10c9c85c70d97880dfe8191b3" hash but actually it should have been "0cc175b9c0f1b6a831c399e269772661" now i... (4 Replies)
Discussion started by: zedex
4 Replies
4. Shell Programming and Scripting
I am a newbie to shell programming. Can someone help me with the following ?
Shell script that accomplishes the following -
# Step 1 List all files in the directory
# Step 2 Loop through each filename say a.htm and MD5 hash the filename to say b.htm
# Step 3 copy a.htm to b.htm
# Step 4... (1 Reply)
Discussion started by: bebar
1 Replies
5. UNIX for Dummies Questions & Answers
I am trying to use John the Ripper but it doesn't take regular MD5 hashes, only shadow MD5 hashes. For example this hash: 900150983cd24fb0d6963f7d28e17f72 (which, decrypted, is 'abc') within a text file, John the Ripper does not detect because it is not in shadow format. How can I convert this MD5... (2 Replies)
Discussion started by: guitarscn
2 Replies
6. Shell Programming and Scripting
Hi there,
I want to encrypt a string (using md5 algorithm) using shell script. Any ideas?
Is possible only using sh or awk ?
I can't install md5sum on my solaris machine
Thanks
regards,
catalin (1 Reply)
Discussion started by: catalint
1 Replies
7. Programming
Hi All
I want to take a Hexadecimal number as input and i want to find lenth of the input and pass it to char s ( char s ). I have a program to convert hexadecial to binary but it is taking limited input but i want to return binary number based on input. How? (1 Reply)
Discussion started by: atharalikhan
1 Replies
8. Shell Programming and Scripting
I am trying to speed up creating a line by line hash file from a huge file using Perl.
Here is my current (working but too slow) Bash code:
(while read line; do hash=$(echo -n $line | md5sum); echo ${hash:0:32}; done)And here is my Perl code:
perl -MDigest::MD5 -le 'foreach $line ( <STDIN> )... (3 Replies)
Discussion started by: Michael Stora
3 Replies
9. Shell Programming and Scripting
I have a .csv file and I want to md5 hash the second column for each row in the file.
File is something like
data1,foobar1,123,345
data2,foobar2,456,9393
data3,foobar3,1002,10109
Output would be like
data1,6c81243028f8e455fa617dd5f0232ce1,123,345... (3 Replies)
Discussion started by: jjwags
3 Replies
10. Shell Programming and Scripting
I have about 1500 rows (encoded b64(b64(md5($pass))) algorythm) in a file.
I would like reverse the b64 into md5 hash format.
How could I do that from command line? So I need only the correct md5 hash formats.
These row format:
4G5qc2WQzGES6QkWAUgl5w
P9tKxonBOg3ymr8vOBLnDA... (1 Reply)
Discussion started by: freeroute
1 Replies
LEARN ABOUT OPENSOLARIS
md5final
md5(3EXT) Extended Library Functions md5(3EXT)
NAME
md5, md5_calc, MD5Init, MD5Update, MD5Final - MD5 digest functions
SYNOPSIS
cc [ flag ... ] file ... -lmd5 [ library ... ]
#include <md5.h>
void md5_calc(unsigned char *output, unsigned char *input,
unsigned int inlen);
void MD5Init(MD5_CTX *context);
void MD5Update(MD5_CTX *context, unsigned char *input,
unsigned int inlen);
void MD5Final(unsigned char *output, MD5_CTX *context);
DESCRIPTION
These functions implement the MD5 message-digest algorithm, which takes as input a message of arbitrary length and produces as output a
128-bit "fingerprint" or "message digest" of the input. It is intended for digital signature applications, where large file must be "com-
pressed" in a secure manner before being encrypted with a private (secret) key under a public-key cryptosystem such as RSA.
md5_calc()
The md5_calc() function computes an MD5 digest on a single message block. The inlen-byte block is pointed to by input, and the 16-byte MD5
digest is written to output.
MD5Init(), MD5Update(), MD5Final()
The MD5Init(), MD5Update(), and MD5Final() functions allow an MD5 digest to be computed over multiple message blocks; between blocks, the
state of the MD5 computation is held in an MD5 context structure, allocated by the caller. A complete digest computation consists of one
call to MD5Init(), one or more calls to MD5Update(), and one call to MD5Final(), in that order.
The MD5Init() function initializes the MD5 context structure pointed to by context.
The MD5Update() function computes a partial MD5 digest on the inlen-byte message block pointed to by input, and updates the MD5 context
structure pointed to by context accordingly.
The MD5Final() function generates the final MD5 digest, using the MD5 context structure pointed to by context; the 16-byte MD5 digest is
written to output. After calling MD5Final(), the state of the context structure is undefined; it must be reinitialized with MD5Init()
before being used again.
RETURN VALUES
These functions do not return a value.
EXAMPLES
Example 1 Authenticate a message found in multiple buffers
The following is a sample function that must authenticate a message that is found in multiple buffers. The calling function provides an
authentication buffer that will contain the result of the MD5 digest.
#include <sys/types.h>
#include <sys/uio.h>
#include <md5.h>
int
AuthenticateMsg(unsigned char *auth_buffer, struct iovec
*messageIov, unsigned int num_buffers)
{
MD5_CTX md5_context;
unsigned int i;
MD5Init(&md5_context);
for(i=0; i<num_buffers; i++)
{
MD5Update(&md5_context, messageIov->iov_base,
messageIov->iov_len);
messageIov += sizeof(struct iovec);
}
MD5Final(auth_buffer, &md5_context);
return 0;
}
Example 2 Use md5_calc() to generate the MD5 digest
Since the buffer to be computed is contiguous, the md5_calc() function can be used to generate the MD5 digest.
int AuthenticateMsg(unsigned char *auth_buffer, unsigned
char *buffer, unsigned int length)
{
md5_calc(buffer, auth_buffer, length);
return(0);
}
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Committed |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO
libmd5(3LIB)
Rivest, R., The MD5 Message-Digest Algorithm, RFC 1321, April 1992.
SunOS 5.11 13 Nov 2007 md5(3EXT)