Any Go equivalent for the following RSA Encryption module?

Hello, I’m trying to use Go to access another api, but this api requires a password thats encrypted in a special way, only through the encryptPublicLong(text: string, publicKey: string) function in the following (old) github repo https://github.com/lsqswl/rsaencrypt/blob/master/lib/index.js
I’m very new to encryption in general so in reality I’m just asking what specific type of encryption this is, and is there a go equivalent to the following encryptPublicLong function?

Not having read that JS file, but just guessing by the name, have you checked the crypto/rsa package?

While I think it is RSA related I’m not sure which implementation is the one I should use, because there are lots of encryption functions like EncryptOAEP, EncryptPKCS1v15

Maybe this code will help you.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.