Can some body tell me how to take SHA-1 of a given string in C. I am using ubuntu 9.04 with kernel 2.6.30.
waqarafridi
-2
Newbie Poster
Recommended Answers
Jump to PostSHA-1 of a given string??what does that indicate?state through an example please....!!
Jump to Postsystem function returns an integer so you cant catch its out put in a string.prototype as follows:
int system(const char *string);
Jump to Post>
s = system("sha1sum -t a.txt");
system() doesn't return the output of an executed command.
It returns an integer value, which indicates whether it could execute the command successfully or not.Edit:: Dream2Code posted before me.
All 12 Replies
Dream2code
12
Junior Poster
waqarafridi
-2
Newbie Poster
Dream2code
12
Junior Poster
mvmalderen
2,072
Postaholic
Dream2code
12
Junior Poster
Salem
5,138
Posting Sage
waqarafridi
-2
Newbie Poster
Dream2code
12
Junior Poster
mvmalderen
2,072
Postaholic
Dream2code
12
Junior Poster
mvmalderen
2,072
Postaholic
Dream2code
12
Junior Poster
mvmalderen
commented:
Because you do much effort to help people, you don't deserve that red dot.
+18
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.