I have a project and a part of it is related to sha 1 encryption using openMP.
Any help would be highly appreciated.

Please ask a specific question. Guessing what kind of "help" you want will result in a lot of wasted time and frustration.

Has a class somewhere suddenly set a number of OpenMP assignments?

I know nothing in c++, but i have the complete code which encrypts a string value using SHA-1. But I need to use parallel programming in C++ (openMP). This is what I don't know how to do it. Below is the code:

#include <iostream>
    #include "sha1.h"
    #include <string>

    using namespace std;

    #define TESTA   "abc"

    void DisplayMessageDigest(unsigned *message_digest);

    int main()
        SHA1        sha;
        unsigned    message_digest[5];


        sha << TESTA;

        if (!sha.Result(message_digest))
            cerr << "ERROR-- could not compute message digest" << endl;
            cout << "Done Successfully!" << endl;

        cout << "Press RETURN to continue...";
        return 0;

    void DisplayMessageDigest(unsigned *message_digest)
        ios::fmtflags   flags;

        cout << '\t';

        flags = cout.setf(ios::hex|ios::uppercase,ios::basefield);

        for(int i = 0; i < 5 ; i++)
            cout << message_digest[i] << ' ';

        cout << endl;


Thanks a lot in advance

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.