Using Unity 2021.3.16f1 LTS. Here's my code:
string name=textfield.text;
string password=textfieldpass.text;
name=name.Remove(name.Length - 1, 1);
password=password.Remove(password.Length - 1, 1);
if(name=="") return;
GameObject.Find("sendtext").GetComponent<TMP_Text>().text="Sending...";
string plainText = (name+"&&."+password+"&&."+double.Parse(PlayerPrefs.GetString("followercounter")).ToString("N0").Replace(".", ""));
string encrypted = RSAEncryption.Encrypt(plainText,"-----BEGIN PUBLIC KEY-----
massive public key
-----END PUBLIC KEY-----" );
Debug.Log(encrypted);
StartCoroutine(GetRequest("https://www.peq42.com/highscore?"+encrypted));
Error thrown when I try to run it:
XmlSyntaxException: System error.
System.Security.Util.Parser.GetRequiredSizes (System.Security.Util.TokenizerStream stream, System.Int32& index) (at <75633565436c42f0a6426b33f0132ade>:0)
System.Security.Util.Parser.ParseContents () (at <75633565436c42f0a6426b33f0132ade>:0)
System.Security.Util.Parser..ctor (System.Security.Util.Tokenizer t) (at <75633565436c42f0a6426b33f0132ade>:0)
System.Security.Util.Parser..ctor (System.String input) (at <75633565436c42f0a6426b33f0132ade>:0)
System.Security.Cryptography.RSA.FromXmlString (System.String xmlString) (at <75633565436c42f0a6426b33f0132ade>:0)
UnityCipher.RSAEncryption.Encrypt (System.Byte[] src, System.String publicKey) (at Assets/Scripts/minorscripts/RSAEncryption.cs:30)
UnityCipher.RSAEncryption.Encrypt (System.String plain, System.String publicKey) (at Assets/Scripts/minorscripts/RSAEncryption.cs:21)
scoresubmit.sendScore () (at Assets/Scripts/minorscripts/scoresubmit.cs:28)
Using Unity 2021.3.16f1 LTS. Here's my code:
Error thrown when I try to run it: