How to create a secret key based on a string in RC4 java using libraries

76 Views Asked by At

This the code to create a random secret key, but I am wondering, is there a way to create one based on a string like "hello"?

KeyGenerator kg = KeyGenerator.getInstance("RC4");
SecretKey k = kg.generateKey();
0

There are 0 best solutions below