Waifu-pics / waifu-api

https://waifu.pics Image sharing platform and API for anime images, entirely user curated (joke gone too far)
https://waifu.pics
ISC License
423 stars 35 forks source link

[Feature request] Adding SHA256 #61

Open TaxMachine opened 2 years ago

TaxMachine commented 2 years ago

it would be great to have in the json the sha256/512 to check the images integrity

galpt commented 1 year ago

it would be great to have in the json the sha256/512 to check the images integrity

I'd say implementing a hash system is possible with Go since I've done this with hashing zip files, which technically gives more burden to the server compared to hashing images.

So it needs to hash an image once and save the hash somewhere, and give it as a json response for future requests, or the server could just hash the image everytime it receives a request, no need to save the hashes at all in this case.

Let's wait for another opinion from the repo maintainer(s).