[Okular-devel] md5 hash for annotation file name
Albert Astals Cid
aacid at kde.org
Wed Sep 10 22:14:45 CEST 2008
A Dimecres 10 Setembre 2008, Markus Grabner va escriure:
> Hi!
>
> It has been discussed (http://bugs.kde.org/show_bug.cgi?id=151614) to
> use a hash function to determine the name of the annotation file created by
> okular. The attached patch implements this behaviour (thanks Ivo for
> pointing me to QCryptographicHash - I looked for such a thing but somehow
> missed it).
>
> It works nicely in several ways:
> *) Annotations keep associated with the file after renaming it.
> *) It also works for non-local URLs (http://...) since we don't need to
> care for mapping the URL to some valid file name.
> *) Annotations keep associated with the file after downloading it from the
> web and opening a local copy (possibly under a different name).
It works not nicely in several ways:
*) Md5 sucks, use Sha1
*) Reading the whole file sucks, i don't want the 100MB of my pdf file to be
piped though a hash, it't probably take *some* time, so reading up to 1MB as
much would be much better imho.
Besides you really need to convince Pino, not me :D
Albert
>
> Kind regards,
> Markus
More information about the Okular-devel
mailing list