Encrypt data using c# and decrypt it using openssl api, why there are lots of trashy padding at the end of decrypted data? -
i using rsa(1024) encrypt/decrypt strings. encryption implemented using public key , written in c#, , decryption implementation c. encrypt string: 86afaecb-c211-4d55-8e90-2b715d6d64b9 and write encrypted data file. then, using openssl api read encrypted data file , decrypt it. however, got output as: 86afaecb-c211-4d55-8e90-2b715d6d64b9oehebjq8fo1amdnor1d3blupyq9wjbaov+m/wvnyzyr pjbkoskoj+4lanpt+spkfk81nsnqebhbjgao4ehnu+pmwl9 it seems there trashy padding @ end of original string. why occurs? , how solve problem? some code snippet shown below: // encrypt { string plaindata = “86afaecb-c211-4d55-8e90-2b715d6d64b9”; rsacryptoserviceprovider rsa = new rsacryptoserviceprovider(); rsa.importparameters(parapub); byte[] testdata = encoding.utf8.getbytes(plaindata); byte[] encrypteddata = rsa.encrypt(testdata, true); filestream pfilestream = null; string filename = "encrypteddata.dat"; pfilestream = new filestream(filename, fi