Kleopatra needs a new hash file generation mode

Hi,

I am White-Polar. After using kleopatra for a little while, I have a suggestion: Kleopatra needs a new hash file generation mode.

Kleopatra can generate hashes of selected files and record them to a text file like sha256.txt. The whole process is great, but there is one problem. The text content is hard-coding the file path, causing Kleopatra to report an error once the location of the file or folder is moved (the integrity of the file does not actually change.)

The following is a comparison, the first is the sha256 verification file generated by 7zip, and the second is the sha256 verification file generated by Kleopatra:

57975812b87eb1d034525ad7ea77b5f92eccc914ea596bb10f49733540652b87  01. 青の夜明け.flac
b12ede11f4fd48154be1311ec24bb540f2132cccb3b7307e75dc0bf137b8e9bc  02. 風の住む街.flac
a9e4cad763e168cb1cc299840c5369a0e98c46e1541073de0a6b25ef75ed7dee  03. 草原の涙.flac
0c2b61652ad3c5954967d6032fe72285d10d5a872f11654741b1c3f5359c60be  04. Storm Of Autumn.flac
55ddc4855c907426a5d981b0a353d15117b608870c01a4824e5c2a711b5449ae  05. サクラ.flac
96e2f8a7d6a80dff9d707fe6d8016a92477b2e0a9e659650fa8059b9e3ecb28d  06. みんな転勤のせいだ.flac
bf428e8db7c0503f7a17c8363b29e1feac7e07362b487ccd649cf8eff7b7b221  07. シチリアーノ.flac
e6dc35aec26bbd6a64087eabb8a43fd79210ac27a70fe2a8028c7f495465c27a  08. 公園通り.flac
ac5f8f445c288742a47605a2a8c7d0d2096fe16a648e3ec302f506705c30d66a  09. 夢.flac
1e2fec3ff85b26f5df793957ec62514e54a7bb1e5724740329a403dd4eb2f42a  10. グノシェンヌ.flac
a770f8032ecc2ed954db3012d6959c2b22563a23f352cb38ea518daff3aa54bd  11. 緋のワルツ.flac
7f2bbfb5c1747b17c85850b751e85fa68f28c741cffde4b54b257d2183493c95  12. 亡き王女の為のパヴァーヌ.flac
306951b4e0024cb3b79e9c345b428581a659a4147b7cecc4088c1d55c2212a8f  13. 風の住む街(Short Version).flac
bd876af7ed8b830f9acc5f882370b2056f16c4d746919bc635b3354b9a377145  cover.jpg
57975812b87eb1d034525ad7ea77b5f92eccc914ea596bb10f49733540652b87  /home/poplar/音乐/main-album/磯村由紀子 - 風の住む街/01. 青の夜明け.flac
b12ede11f4fd48154be1311ec24bb540f2132cccb3b7307e75dc0bf137b8e9bc  /home/poplar/音乐/main-album/磯村由紀子 - 風の住む街/02. 風の住む街.flac
e6dc35aec26bbd6a64087eabb8a43fd79210ac27a70fe2a8028c7f495465c27a  /home/poplar/音乐/main-album/磯村由紀子 - 風の住む街/08. 公園通り.flac
ac5f8f445c288742a47605a2a8c7d0d2096fe16a648e3ec302f506705c30d66a  /home/poplar/音乐/main-album/磯村由紀子 - 風の住む街/09. 夢.flac
a9e4cad763e168cb1cc299840c5369a0e98c46e1541073de0a6b25ef75ed7dee  /home/poplar/音乐/main-album/磯村由紀子 - 風の住む街/03. 草原の涙.flac
0c2b61652ad3c5954967d6032fe72285d10d5a872f11654741b1c3f5359c60be  /home/poplar/音乐/main-album/磯村由紀子 - 風の住む街/04. Storm Of Autumn.flac
1e2fec3ff85b26f5df793957ec62514e54a7bb1e5724740329a403dd4eb2f42a  /home/poplar/音乐/main-album/磯村由紀子 - 風の住む街/10. グノシェンヌ.flac
a770f8032ecc2ed954db3012d6959c2b22563a23f352cb38ea518daff3aa54bd  /home/poplar/音乐/main-album/磯村由紀子 - 風の住む街/11. 緋のワルツ.flac
55ddc4855c907426a5d981b0a353d15117b608870c01a4824e5c2a711b5449ae  /home/poplar/音乐/main-album/磯村由紀子 - 風の住む街/05. サクラ.flac
96e2f8a7d6a80dff9d707fe6d8016a92477b2e0a9e659650fa8059b9e3ecb28d  /home/poplar/音乐/main-album/磯村由紀子 - 風の住む街/06. みんな転勤のせいだ.flac
7f2bbfb5c1747b17c85850b751e85fa68f28c741cffde4b54b257d2183493c95  /home/poplar/音乐/main-album/磯村由紀子 - 風の住む街/12. 亡き王女の為のパヴァーヌ.flac
306951b4e0024cb3b79e9c345b428581a659a4147b7cecc4088c1d55c2212a8f  /home/poplar/音乐/main-album/磯村由紀子 - 風の住む街/13. 風の住む街(Short Version).flac
bf428e8db7c0503f7a17c8363b29e1feac7e07362b487ccd649cf8eff7b7b221  /home/poplar/音乐/main-album/磯村由紀子 - 風の住む街/07. シチリアーノ.flac

Using absolute paths to files is not a wise decision in my opinion. So I suggest that Kleopatra should use relative paths when generating sha256 verification files.

A workaround:

$ sha256sum files >  files.sha256   #Calculates the checksum of the selected file and writes the result to the specified file
$ sha256sum --check files.sha256    #Read SHA256 sums from the files.sha256 and check them.