Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

  • 0
Erarnitox

Decoding string empty output

Question

hey ive got a problem when i try to restore my original seed from the "shortened" one.

 

Shortened Seed/Inut is (cant copy/paste the exact string since it uses unicode):

 ǻM߸ࡪʙŅࠚœՈϰňfҬ̓ࡒ߮Ϝר£Ӹτ߻ݍєࡪݍ̟[¡Lτ߽ņ 

 

Output sould be: 

003i50i0i99i2i30i173i0.01020087i53i1.700173i4.7i20i0.54i87i0.6729521i-0.37699i-0.6940705i0.5029541i1i1

 

The long seed only uses 13 different chars (so i theated it as a base 13 number) and converted it to a higher base to shorten it and get the shortSeed.

(egs. like you would do to convert from binary to octal) 

 

here is the code: 

Please login or register to see this code.

in debug log i get an completely empty seed and i wonder why that is since i have no clue :(

thanks for your help guys :)

 

(If any information on how i created the seed etc. is needed feel free to ask and i will provide additional information for better understanding.) 

 

Edited by Erarnitox

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

I suggest you convert from one character set to another using byte arrays.

character set A string-> byte array -> character set B string

character set B string-> byte array -> character set A string

 

If one of these character sets is a standard, like unicode, you can use System.Text.Encoding to convert to byte arrays and back.

For your other character set, you'll need to implement converting to and from a byte array yourself. But notice that if the number of characters in your set is a power of 2 (not 13), this is really easy. For example with a character set of 16 characters, every 4 bits in the byte array can be converted to a character (and vice versa).

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...