Whirlpool API



  • @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...";
    }
    


  • 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.



  • @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...


Log in to reply
 

12
Online

752
Users

3.0k
Topics

24.9k
Posts