Can I do this with your APIs?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Can I do this with your APIs?

Arnold Morein
I want to store my clients' and my public keys in a database table in a clob field in base64 format, as exported from the GPG keychain.

My goal is to avoid creating a GPG keychain on the servers where the WAR app will run and having to access the chain in the file system.

What I need to know is:

Given an input steam from said string/clob, can I instantiate a PGPPublicKey with just this information? And then given a newly created virtual PGPPublicKeyRingCollection containing just one key can be used in encrypting and decrypting.

Can anyone point me at specific examples or a list of Classes I should look at using?

Thanks in advance!
Reply | Threaded
Open this post in threaded view
|

Re: Can I do this with your APIs?

David Hook-3

Yes, this can be done. There are a few examples of this sort of thing in the test classes. You could start with PGPKeyRingTest.

Regards,

David

On 17/1/19 12:55 pm, Arnold Morein wrote:
I want to store my clients' and my public keys in a database table in a clob field in base64 format, as exported from the GPG keychain.

My goal is to avoid creating a GPG keychain on the servers where the WAR app will run and having to access the chain in the file system.

What I need to know is:

Given an input steam from said string/clob, can I instantiate a PGPPublicKey with just this information? And then given a newly created virtual PGPPublicKeyRingCollection containing just one key can be used in encrypting and decrypting.

Can anyone point me at specific examples or a list of Classes I should look at using?

Thanks in advance!