Страница 1 из 1

MD5 hash for example Israeli Topo

СообщениеДобавлено: 05 авг 2015, 23:21
zoulou
Hello

Is it possible to use hashed tiles ?
Israeli topo site uses following function to get the tiles :

GetUrlScript.txt:
Код: Выделить всё
TextToMd5 := MD5Print(MD5String('Copyrighted AmudAnan ' + IntToStr(GetZ-1) + '/' + IntToStr(GetY) + '/' + IntToStr(GetX)));
ResultURL := GetURLBase + TextToMd5+ '.png';


The output :
"Copyrighted AmudAnan 15/13328/19584" equals "4ad6114ecf2f44c84765c5bf7c1c2614"

So these are equivalent :
http://a.amudanan.co.il/tiles/I50N64/4ad6114ecf2f44c84765c5bf7c1c2614.png

But there is a error "MD5Print" and "MD5Script". Why ?
Is there a way to use the hashed version ?

Thanks in advance

Re: MD5 hash for example Israeli Topo

СообщениеДобавлено: 06 авг 2015, 10:05
zed
zoulou писал(а):But there is a error "MD5Print" and "MD5Script". Why ?

Because there is no such functions yet Описание скриптов Pascal, but they can be added in next Nightly builds SASPlanet if you create a new ticket in our Bugtracker.

And I think that you need only one function that calculate MD5 checksum by given string and return result in string representation i.e. function MD5String(const Adata: string): string.