multi-line constants? (for RSA keys)

Richmond richmondmathewson at gmail.com
Sat Mar 22 15:37:48 EDT 2014


On 22/03/14 21:21, Dr. Hawkins wrote:
> RSA keys, as generated, are multiple lines, like
>   "-----BEGIN PUBLIC KEY-----"
> "ABC123"
> "DEF456"
> "-----END PUBLIC KEY-----"
>
> I'm trying to do something like
>
> constant mykey= "-----BEGIN PUBLIC KEY-----" \
> & "ABC123"\
> & "DEF456"\
> & "-----END PUBLIC KEY-----"
>
> but it appears that you can't concatenate strings like this . . . (using
> 6.6.0)
>
> Is there a clean solution for this?
>

Where are you getting your RSA key from?

If, for the sake of argument, you have it loaded into your stack as a 
string variable
  you could do something like this:

  put line 1 of RSA after myKey
    put line 2 of RSA after myKey
    put line 3 of RSA after myKey
    put line 4 of RSA after myKey

Richmond.




More information about the use-livecode mailing list