Click here to Skip to main content
15,913,055 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Selecting median Pin
Stefan_Lang27-Apr-12 6:33
Stefan_Lang27-Apr-12 6:33 
QuestionMFC, Threads and Responsive GUI Pin
Member 296436524-Apr-12 2:10
Member 296436524-Apr-12 2:10 
AnswerRe: MFC, Threads and Responsive GUI Pin
JohnCz24-Apr-12 2:35
JohnCz24-Apr-12 2:35 
GeneralRe: MFC, Threads and Responsive GUI Pin
krmed24-Apr-12 10:31
krmed24-Apr-12 10:31 
GeneralRe: MFC, Threads and Responsive GUI Pin
JohnCz24-Apr-12 11:11
JohnCz24-Apr-12 11:11 
AnswerRe: MFC, Threads and Responsive GUI Pin
Rajesh R Subramanian25-Apr-12 3:59
professionalRajesh R Subramanian25-Apr-12 3:59 
AnswerRe: MFC, Threads and Responsive GUI Pin
Eytukan27-Apr-12 3:27
Eytukan27-Apr-12 3:27 
QuestionDesign Practices, implementing RSA Pin
Vidit Ochani24-Apr-12 2:00
Vidit Ochani24-Apr-12 2:00 
I am implementing RSA in C++ and here's my design(code structure).

keygen.h
C++
namespace rsa{
    class keygen{
        public:
        //Constructor
        keygen(size);
        //Generate keys
        void generate();
        //Getters
        string gete(){ return xyz; }
        .. 
        ..
        ..
      
        private:
        //initializes bignums
        void initall();
        keygen(){}
        //Private Member variables goes here
    }
}


prime.h
C++
namespace rsa{
    //First 100 primes
    unsigned int primes[]={2,3,5,7,11.....541};

    //MillarRabin Primality
    bool isPrime(mpz_t, unsigned short);
    //Get Random Prime
    void getPrime(mpz_t, mpz_t)
}


endec.h
C++
namespace rsa{
    //Encryption
    string encryption(string text, const string& n, const string& e);
    //Decryption
    string decryption(string cipher, const string& n, const string& d);
}


Is this a good design? How can I make it better? I want to improve the structure or the overall design, that's why dint post any implementation specific code. Things like naming standards, using classes wherever applicable, standard function signature and similar is what I'm looking for.
AnswerRe: Design Practices, implementing RSA Pin
Aescleal24-Apr-12 4:28
Aescleal24-Apr-12 4:28 
GeneralRe: Design Practices, implementing RSA Pin
Vidit Ochani25-Apr-12 0:33
Vidit Ochani25-Apr-12 0:33 
GeneralRe: Design Practices, implementing RSA Pin
Aescleal25-Apr-12 5:15
Aescleal25-Apr-12 5:15 
GeneralRe: Design Practices, implementing RSA Pin
Vidit Ochani25-Apr-12 10:02
Vidit Ochani25-Apr-12 10:02 
GeneralRe: Design Practices, implementing RSA Pin
Aescleal27-Apr-12 1:35
Aescleal27-Apr-12 1:35 
QuestionButton Color In MFC Pin
002comp24-Apr-12 0:40
002comp24-Apr-12 0:40 
AnswerRe: Button Color In MFC Pin
JohnCz24-Apr-12 2:38
JohnCz24-Apr-12 2:38 
GeneralRe: Button Color In MFC Pin
002comp24-Apr-12 2:42
002comp24-Apr-12 2:42 
AnswerRe: Button Color In MFC Pin
David Crow24-Apr-12 2:39
David Crow24-Apr-12 2:39 
GeneralRe: Button Color In MFC Pin
002comp24-Apr-12 2:44
002comp24-Apr-12 2:44 
GeneralRe: Button Color In MFC Pin
David Crow24-Apr-12 6:40
David Crow24-Apr-12 6:40 
AnswerRe: Button Color In MFC Pin
jeron124-Apr-12 3:58
jeron124-Apr-12 3:58 
AnswerRe: Button Color In MFC Pin
JohnCz24-Apr-12 4:08
JohnCz24-Apr-12 4:08 
QuestionRe: Button Color In MFC Pin
David Crow24-Apr-12 6:04
David Crow24-Apr-12 6:04 
AnswerRe: Button Color In MFC Pin
JohnCz24-Apr-12 7:42
JohnCz24-Apr-12 7:42 
GeneralRe: Button Color In MFC Pin
enhzflep24-Apr-12 8:13
enhzflep24-Apr-12 8:13 
GeneralRe: Button Color In MFC Pin
JohnCz24-Apr-12 10:55
JohnCz24-Apr-12 10:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.