Вот рабочие 2 кода на PhP используя либу
phpseclib.sourceforge.net:
include("Crypt/RSA.php");
$RSA = new Crypt_RSA();
$Modulus = "BIG HEX Строка";
$PublicExponent = "010001";
$Pass = "Пароль от Steam";
$RSA->setEncryptionMode(CRYPT_RSA_ENCRYPTION_PKCS1);
$RSA->loadKey(["n" => new Math_BigInteger("$Modulus", 16), "e" => new Math_BigInteger("$PublicExponent", 16)]);
$RSA->setPublicKey();
openssl_public_encrypt($Pass, $Data, $RSA->getPublicKey());
$Data = base64_encode($Data);
// ИЛИ
include("Crypt/RSA.php");
$RSA = new Crypt_RSA();
$Modulus = "BIG HEX Строка";
$PublicExponent = "010001";
$Pass = "Пароль от Steam";
$RSA->setEncryptionMode(CRYPT_RSA_ENCRYPTION_PKCS1);
$RSA->loadKey([
"modulus" => new Math_BigInteger("$Modulus", 16),
"publicExponent" => new Math_BigInteger("$PublicExponent", 16)
], CRYPT_RSA_PUBLIC_FORMAT_RAW);
$PassCrypt = base64_encode($RSA->encrypt($Pass, false));