Encrypt password from text with RSA 4096 bit

Hi

I already got the pem file, how can I encrypt my password with the pem file? alternatively which code should I invoke to encrypt the text directly in Studio?

At the moment I’m using a Linux server to do the encryption, but I would like to skip the Linux steps.

best regards
Michael

Hey!

Have you tried with UiPath.Cryptography.Activities package

If not try with this

Reference:

Regards,
NaNi

Hi Nani

Already tried that. But it unfortunately doesn’t have rsa.

Hent Outlook til Android

No ideas to solve this?

@Michaeljep Did you try this

Hi Ushu

Just tried it, the encrypted pass is much much shorter than using the Linux machine, so I doesn’t recon it to work - unfortunately.

I believe it should be done with an invoke VB/C# or maybe a Java code, but my capabilites doesn’t go quite that far.

Hi,

The RSA cipher is an asymmetric cipher.
If you have your own private key, you can create your signification with the key using RSA.
If you have other person’s public key, you can create encryption data which can be decrypted by only him, using RSA.
Which do you want to achieve either of the above?

Or if your intent is not the above, can you elaborate?

Regards,

Hi,

It would number 2, I have a pem file with a public key from the provider of our system. With that file I’m supposed to encrypt a password ending up with an encrypted password in base64 format. Does it make sense?

if it makes more sense, this is the command the Linux machine is executing;

openssl rsautl -encrypt -inkey public_key_rsa_4096_pkcs8-exported.pem -pubin -in password.txt | base64 -w 0 > password.encrypt.txt

Hi,

I think we can achieve it using .net class such as RSACryptoServiceProvider and this site etc, however it seems complicated.

So, simply how about to install OpenSSL in your PC and run same command (at least OpenSSL command) from UiPath?

Regards,