Azure Function-pgp encrypt file stored in blob storage

Upendra Rajak (Targetbase) 0 Reputation points
2024-07-09T20:11:36.4233333+00:00

I am using below code to pgp encrypt a blob file. However it is returning error that I am passing multiple value for recipients but 'key_fingerprint' contains only one and correct fingerprint value. I have tried gpg.encrypt_file() option in azure function but it says there is no attribute gpg.encrypt_file() but it works fine in vs code. I have python 3.11 and gpg 2.4 version. I am not sure what is wrong here. kindly suggest.

encrypted_data = gpg.encrypt(downloadblob_data, recipients=[key_fingerprint], armor=False)
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,782 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.