Add support to detect pgp encrypted file
BrendanBall opened this issue · comments
Brendan Ball commented
It would be awesome if this package can detect if a file is pgp encrypted.
Tom commented
If there is a file signature bytes header that we can recognize consistently, it can be done. Can you provide it? E.g: file magic numbers header.
Brendan Ball commented
Not sure, I know that the file
app on linux/mac can detect it. e.g.
file test.pgp
test.pgp: PGP RSA encrypted session key - keyid:<keyid> RSA (Encrypt or Sign) 2048b .
It's not listed in https://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_numbers_in_files but I'll investigate a bit further.
FerdieBerfle commented
PGP files will always start with the ASCII text "----- Begin PGP"