Forum

    • Register
    • Login
    • Search
    • Categories

    Whirlpool API

    C++ Development
    2
    3
    57
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ustk
      ustk last edited by

      @Christoph-Hart I having a hell of a time trying to wrap up an API for the Whirlpool hash... Any hint maybe?

      I need to return a string from a string (just because it's easier to handle in fact)

      Here's a bunch of non-sense ideas...

      String ScriptingApi::Engine::getWhirlpoolHashFromString(String data)
      {
      	//MemoryBlock MemBlockData  = String::toHexString(data.getData(), data.getSize());
      
      	//String myString("This is my string");
      
      	MemoryBlock mb(data.toUTF8(), data.length());
      
      	Whirlpool::Whirlpool(mb);
      
      	///MemoryBlock Whirlpool::getRawData() const
      	//{
      	//    return MemoryBlock (result, sizeof (result));
      	//}
      
      	return "For the moment, just prout...";
      }
      

      Tired to press F5 in the forum...
      Studio427 Audio - Audio Instruments & FX Plugins for music production. Website - Facebook

      1 Reply Last reply Reply Quote 0
      • Christoph Hart
        Christoph Hart last edited by

        Just hang in there, I am currently writing a few Server & FileSystem API classes myself 🙂

        I don't know about Whirlpool, but I've just written a File.writeEncryptedObject(jsonData, someKey) method that uses Blowfish encryption.

        ustk 1 Reply Last reply Reply Quote 2
        • ustk
          ustk @Christoph Hart last edited by

          @Christoph-Hart Was as simple as this 🙂

          String ScriptingApi::Engine::getWhirlpoolHashFromString(String data)
          {
          	return Whirlpool (data.toUTF8()).toHexString();
          }
          

          It's much more secure than SHAs, and since (for the moment) I don't need encryption, a good hash is enough...

          Tired to press F5 in the forum...
          Studio427 Audio - Audio Instruments & FX Plugins for music production. Website - Facebook

          1 Reply Last reply Reply Quote 0
          • First post
            Last post

          14
          Online

          852
          Users

          5.7k
          Topics

          52.9k
          Posts