F fishwolf Well-Known Member Licensed User Longtime User Dec 23, 2016 #1 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
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
KMatle Expert Licensed User Longtime User Dec 23, 2016 #2 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. Upvote 0
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.
F fishwolf Well-Known Member Licensed User Longtime User Dec 23, 2016 #3 KMatle said: 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. Click to expand... 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
KMatle said: 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. Click to expand... 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)
KMatle Expert Licensed User Longtime User Dec 24, 2016 #4 fishwolf said: private key Click to expand... A token is just a unique id. So you need encryption? Take a look at my RSA example here or use B4x encryption. AES is possible, too. Take a search. Upvote 0
fishwolf said: private key Click to expand... A token is just a unique id. So you need encryption? Take a look at my RSA example here or use B4x encryption. AES is possible, too. Take a search.