Page 1 of 1

TScCMSProcessor, TScFileStorage example

Posted: Fri 15 Jul 2022 14:11
by tam
Hello,

I struggle to en- and decrypt a file using TScCMSProcessor and TScFileStorage. The tagret is to encypt a text file with a public key and decrypt it with a private key. I already have created a certificate, a private and a public key. Also I have created a user, but honestly I have no idea how this all should go together.

I found nearly no documentation for TScCMSProcessor, so I kindly ask, if someone can provide an example code doing this.

Thanks in advance.

Re: TScCMSProcessor, TScFileStorage example

Posted: Thu 21 Jul 2022 12:59
by tam
Hi,

any help is much appreciated...

Thanks.

Re: TScCMSProcessor, TScFileStorage example

Posted: Mon 01 Aug 2022 13:03
by Dimon
Please view the following topics: viewtopic.php?f=27&t=37040&p=128835

Re: TScCMSProcessor, TScFileStorage example

Posted: Mon 01 Aug 2022 13:05
by Dimon
To encrypt data just call the TScCMSProcessor.Encrypt method, specifying the encrypted data as an input parameter of the method.
To decrypt data call the TScCMSProcessor.Decrypt method, specifying the enveloped CMS/PKCS #7 message as an input parameter of the method.