Android Question Token generation

fishwolf

Well-Known Member
Licensed User
Longtime User
I need generate a token (string of chars) from a simple string with a key.

"mystring" + "key" = "aassddfflglgglglhlyy"

the same generation must work fine with php language.

Client and server check the same token for authorize the api.

what is the best function/library b4x (b4a/b4i)?

thanks
 

fishwolf

Well-Known Member
Licensed User
Longtime User
No need for a library. Just Convert your token (string) to a Base64 string with StringUtils (in php: base64_encode/decode). Set everything to UTF-8.

basa64 has not a key string (private key) for a personal generation

i don't need a decode function, only encode (match client and server token result)
 
Upvote 0
Top