Let's say I have aggregated ~1GB of data in memory into a string or corresponding data structure. My goal is to encrypt this data before sending it over the wire. With my limited understanding of encryption, I was looking into asymmetric key encryption and using a public key to do this task. Upon a couple Google searches, it sounds like this will not be possible due to the byte limitation of encryption with a public key. (Is this correct?).
Alternatively, what are my options for achieving something like this? My goal is to essentially perform encryption in memory of large amounts of information without writing to disk.