I have a string like this:
String A: [ 12234_1_Hello'World_34433_22acb_4554344_accCC44 ]
I would like to encrypt String A to be used in a clean URL. something like this:
String B: [ cYdfkeYss4543423sdfHsaaZ ]
Is there a encode API in python, given String A, it returns String B?
Is there a decode API in python, given String B, it returns String A?
One way of doing the encode/decode is to use the package base64, for an example:
Is it what you were looking for? With your particular case you get:
input: 12234_1_Hello’World_34433_22acb_4554344_accCC44
encoded: MTIyMzRfMV9IZWxsbydXb3JsZF8zNDQzM18yMmFjYl80NTU0MzQ0X2FjY0NDNDQ=
decoded: 12234_1_Hello’World_34433_22acb_4554344_accCC44