#Random Generator From Word to Numbers, from Numbers to n possibles Words

1 messages · Page 1 of 1 (latest)

honest blaze
#

Hello everyone, I'm a complete noob, but I would like to ask help to make a little projet.

The Ideia is very simple:

I input a seed, that can have a length from 2-30 letters
2.The system give back x numbers. The range of numbers can be pre-determinate on the start and the numbers don't repeat

3.If someone get the out put, and knows the length, be possible to get N seeds that would generate the same output.

​It does not matter what type of program is used

Someone know how can I start this project?

viscid mangoBOT
#

<@&987246717831381062> please have a look, thanks.

viscid mangoBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

civic plaza
#

i dont really understand ur description fully. could u make a concrete example with some toy values please

honest blaze
#

Of course, let's take the following parameters:
-The output is set to be 5 numbers from 1 to 60
-The User input a Word
-Which the system gives the numbers.
-If the User wants, he/she can put the numbers that the system have given to them, and see the seeds that generate it

#

For example: I choose "hotdog" as word
The system tells me that for that word the numbers are 1,2,3,4,5
To know the possibility I later put 1,2,3,4,5 as input to see what seeds would generate theses numbers, among them is "hotdog"

honest blaze
plucky flint
#

You could get the byte[] from the input String i.e. byte[] data = input.getBytes(); and then pass that into a random generator as your seed value

#

Such as ISAAC or whatever your choice of algorithm would be

honest blaze
#

I was thinking about hashing too, but in this case if I have more than one word in the ans it's OK

plucky flint
#

Oh sorry, you want to use their input as a key for encryption/decryption?

#

But limit the scope so that the encrypted output is in an int[] format that falls within a specific number between 0-n?

honest blaze
#

Yeap

#

I am aware that it will make many word without sense in the end and with length differents, but that's completely OK for the use

plucky flint
#

Maybe make your own modified version of the Vigenere cipher?

#

That fits your scope

honest blaze
#

But it would be possible to make from word to numbers?

plucky flint
#

Well use the index value of each letter e.g.

A = 0
B = 1
C = 2
D = 3
...

honest blaze
#

I will give it a try, if it doesn't work I will be back

#

Thanks man