-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[addons] add callback function to get the MD5 digest of the given text #12204
Conversation
jenkins build this please |
Kodi is not a complete toolbox for everything needed by addons. kodiplatform was invented for stuff like this as there is no interaction with kodi needed. |
@akva2 I understand you but in this case it is acceptable for me to have from Kodi. Reasons are:
|
My current requests are primary to bring in a new way for inputstream addons to allow encrypted streams. But want to have it also predefined as a basic framework for other languages in future. |
it's a slippery slope and i would hold the principles high in this case. but it's not my call to make. btw, the idea was to make kodi a consumer of kodiplatform. most generic utils in xbmc/utils would go there. that way all this code is available to kodi and its add-ons, and there is only a single version to maintain. |
/// #include <kodi/General.h> | ||
/// ... | ||
/// std::string md5 = kodi::GetMD5("Make me as md5"); | ||
/// fprintf(stderr, "My md5 digest is: '%s'\n", md5.c_str()); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
/// | ||
inline std::string GetMD5(const std::string& text) | ||
{ | ||
char* md5ret = static_cast<char*>(malloc(40*sizeof(char))); // md5 size normally 32 bytes |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This sounds like a good way to go. So there would be no effort to maintain the callbacks. But this is not my call too as I don't have the huge overview like you both. |
What @AchimTuran said. |
jenkins build this please |
Description
Is needed on my test on GUI addon callbacks.
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of change
Checklist: