Not able to use /n (new line) character. Please HELP!
I am trying to create a dynamic public key which will be used to verify signature.I have written lambda function for that.
My code:
const EncodedKey = "-----BEGIN PUBLIC KEY-----" + "\r\n" +$var.publicKey + "\r\n" +"-----END PUBLIC KEY-----"; |
---|
The error:
error:0909006C:PEM routines:get_name:no start line
Please kindly help me.😔
Answers
-
Is this a lambda? Because I think you want a second line with "return EncodedKey". YOu can confirm by using "stop-and-debug" after your lambda to confirm the output is the text you're looking for.
-
yes it is a lambda function.
My current code is:
const EncodedKey = "-----BEGIN PUBLIC KEY-----" + "\r\n" +$var.publicKey + "\r\n" +"-----END PUBLIC KEY-----";
return EncodedKey;
The texts in EncodedKey are not appending in new line.
What I am getting:
-----BEGIN PUBLIC KEY----- {public key} -----END PUBLIC KEY-----
My requirement is:
-----BEGIN PUBLIC KEY-----
{public key}
-----END PUBLIC KEY-----
Please help me with this.
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback