CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2013
    Posts
    25

    C++ to put a message string through an algorithm / cryptography??

    all,

    I'm looking for a resource (possibly CPP) for which I could do the following on a windows and linux machine:

    1) type a string message into a GUI control (or some other input that can be accessed by the resource).

    2) run a resource script that puts the message through a hash function (or a custom hash function) and outputs the hash string.

    3) have a reverse function available in order to decrypt the message in an input fashion just like step #1.

    can someone tell me what open-source resource might be the best for this? Right now I am imagining typing a message into a text file, saving the file to a hard drive location, running a script on it replacing the old file with a new file that just has a hash string in it, then using that hash string for the encoded message.

    does this sound feasible to anyone? can anyone suggest a better way to do this?

    thanks.

  2. #2
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,822

    Re: C++ to put a message string through an algorithm / cryptography??

    One possibility is Blowfish encryption.

    http://www.codeproject.com/Articles/...ncryption-Decr
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++23 Compiler: Microsoft VS2022 (17.6.5)

  3. #3
    Join Date
    Mar 2013
    Posts
    25

    Re: C++ to put a message string through an algorithm / cryptography??

    thanks. I'll get back to you on this.

  4. #4
    Join Date
    Mar 2013
    Posts
    25

    Re: C++ to put a message string through an algorithm / cryptography??

    kaud,

    it looks like that implementation uses the shell. the shell is not an output medium where a message can be copied from it to an operating system temporary medium like a clipboard. is it? I'm trying to get something here where I don't have to learn much code to manipulate it, and CPP is not something I'm even a a novice in. Any assistance on that real quick?

  5. #5
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,822

    Re: C++ to put a message string through an algorithm / cryptography??

    That open-source implementation uses standard c++. It's class based and easy to use from a c++ program on either windows or linux.
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++23 Compiler: Microsoft VS2022 (17.6.5)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured