public static function rsaEncrypt($message, $public_key, $modulus, $keylength)
    {
        $padded = RSA::addPKCS1Padding($message, true, $keylength / 8);
        $number = RSA::binaryToNumber($padded);
        $encrypted = RSA::powMod($number, $public_key, $modulus);