HISE Logo Forum
    • Categories
    • Register
    • Login

    Whirlpool API

    Scheduled Pinned Locked Moved C++ Development
    3 Posts 2 Posters 208 Views
    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.
    • ustkU
      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...";
      }
      

      Can't help pressing F5 in the forum...

      1 Reply Last reply Reply Quote 0
      • Christoph HartC
        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.

        ustkU 1 Reply Last reply Reply Quote 2
        • ustkU
          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...

          Can't help pressing F5 in the forum...

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

          51

          Online

          1.7k

          Users

          11.7k

          Topics

          101.8k

          Posts