How to properly Signed a File with PGP

Hi community, I have a requirement of only sign a file using the N/pgp module, looking at the documentation I find this solution that uses the N/pgp N/crypto/certificate and N/encoding to create a Signer

const signer = pgp.createSigner({
key: keys.ours.pri,
algorithm: cryptoCertificate.HashAlg.SHA256.toString()
})
signer.update({ input: fileContent })
const signature = signer.sign()


The problems is that when i tried to validate that signed file using GnuPG, I get an error saying that the file doesn’t contain a valid OpenPGP format.

did i miss an step or the output is another type o Signature?

Here is the documentation I was using:
https://suiteanswers.custhelp.com/app/answers/detail/a_id/1017003/loc/en_US#subsect_0618111539

Rookie Asked on February 7, 2025 in SuiteScript.
Add Comment
1 Answer(s)

Hi! I have the same issue. Were you ever able to resolve this? Looking for any help I can get.

Thanks,
Kyra

Rookie Answered on July 25, 2025.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   SuiteMigration   Become a Sponsor