Skip to content
Advertisement

String to Secret key conversion/Vice Versa

I am generating a Secret Key like below : key = KeyGenerator.getInstance(ALGO_SECRET_KEY_GENERATOR).generateKey();

And I want to send this key to another activity. If I use intent I think then this need to be converted into a String from Secret key. Can anyone tell me about Secret key conversion/Vice Versa…

Advertisement

Answer

Just follow below steps.

From key to string

JavaScript

From string to key

JavaScript

It is available from api version 8

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement