Decryption for network image
nicop2000 opened this issue · comments
nicop2000 commented
Is it possible to decrypt images on download?
I have stored image data on a public server but it is encrypted and I need to decrypt it after downloading and before displaying the image
Wei Wang commented
I believe this is what you need.
KingfisherManager.shared.downloader.delegate = self
extension YourClass: ImageDownloaderDelegate {
func imageDownloader(_ downloader: ImageDownloader, didDownload data: Data, for url: URL) -> Data? {
return data.decrypted
}
}
nicop2000 commented
Thank you very much :)