Operations (sample payloads)
Main operationsCopy
Copy
PGP decrypt fileCopy
Copy
Decrypts a PGP-encrypted file.
Sample Input
1{2"keys": {3"private_key": "-----BEGIN PGP PRIVATE KEY BLOCK-----\n...\n-----END PGP PRIVATE KEY BLOCK-----",4"passphrase": "mySecurePassphrase123"5},6"file": {7"name": "encrypted_document.pgp",8"url": "https://example.com/files/encrypted_document.pgp",9"mime_type": "application/pgp-encrypted",10"expires": 167253120011}12}
Sample Output
1{2"file": {3"name": "decrypted_document.txt",4"url": "https://example.com/files/decrypted_document.txt",5"mime_type": "text/plain",6"expires": 16726176007}8}
PGP encrypt fileCopy
Copy
Encrypts a file into PGP-armored format.
Sample Input
1{2"keys": {3"public_key": "-----BEGIN PGP PUBLIC KEY BLOCK-----\nVersion: OpenPGP.js v4.10.10\nComment: https://openpgpjs.org\n\nxjMEYBVkaxYJKwYBBAHaRw8BAQdAZ3Nz8VX9qQQYVqx+X+mT9SvxDMElf0Wy\nTK5SFhjNnynNGVRyYXkgVXNlciA8dHJheUB0cmF5LmlvPsKPBBAWCgAgBQJg\nFWRrBgsJBwgDAgQVCAoCBBYCAQACGQECGwMCHgEAIQkQZ9E6ES8RXvMWIQTp\nq7xfYg1Pq3Bo2+Nn0ToRLxFe8+TmAP9sauJsKsT+QyHH5SS7w8iVJGa72W3q\ngjctRQXNZ+pXwgEAqLYLomtviKfBUOLs+rP/k37TQyBgM5DgXj9RgK85Agc=\n=OKSM\n-----END PGP PUBLIC KEY BLOCK-----"4},5"file": {6"name": "sensitive_data.txt",7"url": "https://example.com/files/sensitive_data.txt",8"mime_type": "text/plain"9}10}
Sample Output
1{2"file": {3"name": "sensitive_data.txt.pgp",4"url": "https://example.com/files/sensitive_data.txt.pgp",5"mime_type": "application/pgp-encrypted",6"expires": 16234567897}8}