Hi Martin,
congrats to your exiting and valuable work!
I really would like to perform automated HTTP requests against my Fritz.Box. Therefore I have to calculate a md5 hash which I couldn't find to realize in the script action.
Could you please add a function which calculates this hash out of a given string please? Hope that Android already supports such function so it's not too hard work.
Thanks in advance for your help!
Stefan
MD5 calculation
Moderator: Martin
Re: MD5 calculation
Hi,
Android internally supports MD5 and some other algorithms, adding an action or script function to do this should be possible.
Can you post a link to an example of such a request? What data needs to be MD5ed, a local variable or a file?
Regards,
Martin
Android internally supports MD5 and some other algorithms, adding an action or script function to do this should be possible.
Can you post a link to an example of such a request? What data needs to be MD5ed, a local variable or a file?
Regards,
Martin
-
- Posts: 12
- Joined: 02 Dec 2013 22:35
Re: MD5 calculation
Hi Martin,
thanks for answering quiet fast.
According to the attached notes from AVM a string which I get via HTTP request before and save in a local variable has to be hashed.
http://www.avm.de/de/Extern/files/sessi ... ion_ID.pdf
I have some function in mind that looks like
hash = md5 ( string )
Cheers
Stefan
thanks for answering quiet fast.
According to the attached notes from AVM a string which I get via HTTP request before and save in a local variable has to be hashed.
http://www.avm.de/de/Extern/files/sessi ... ion_ID.pdf
I have some function in mind that looks like
hash = md5 ( string )
Cheers
Stefan
Re: MD5 calculation
Hi,
I've added a new script function hash to the next version (test version available in the EAP forum).
You can specify the algorithm (MD5) and the encoding used to convert the string to bytes.
The function call for FritzBox probably needs to look like this:
hashsum = hash("1234567z-äbc", "UTF-16LE", "MD5");
which should return the string 9e224a41eeefa284df7bb0f26c2913e2
Regards,
Martin
I've added a new script function hash to the next version (test version available in the EAP forum).
You can specify the algorithm (MD5) and the encoding used to convert the string to bytes.
The function call for FritzBox probably needs to look like this:
hashsum = hash("1234567z-äbc", "UTF-16LE", "MD5");
which should return the string 9e224a41eeefa284df7bb0f26c2913e2
Regards,
Martin
-
- Posts: 12
- Joined: 02 Dec 2013 22:35
Re: MD5 calculation
Hi Martin,
thanks a lot for implementing my request. I'm very exited about your extremely fast response and solving time. All thumbs up for this and I will try the new test app immediately!
Enjoy your weekend!
Stefan
thanks a lot for implementing my request. I'm very exited about your extremely fast response and solving time. All thumbs up for this and I will try the new test app immediately!
Enjoy your weekend!
Stefan
-
- Posts: 12
- Joined: 02 Dec 2013 22:35
Re: MD5 calculation
Function works fine. I successfully implemented my wanted functionality (switching FritzBox smart home device on and off).
Re: MD5 calculation
Hallo skahlhoefer,skahlhoefer wrote: ↑08 Dec 2013 21:55Function works fine. I successfully implemented my wanted functionality (switching FritzBox smart home device on and off).
das hört sich gut an. Wie muss der Flow/Code dazu aussehen?
Ich suche und probiere schon seit Tagen nach einer Lösung.
Gruß Sebastian
Edit: Lösung = viewtopic.php?f=5&t=8227