If I run Convert.FromBase64String(“test”) I get the error that it’s invalid length. I’m trying to convert to a byte array so I can encrypt it, but on shorter strings it’s giving the length error. I tried rpadding with ‘=’ but no matter how many I put nothing seems to work.
What are my options with this?
If you have text data that you need to store as binary:
If you have binary data you need to store as a string;
So: look at Encoding.