Encrypt string to 10 random characters RRS feed

  • Question

  • User670644709 posted

    Dear All, 

    i want to encrypt / decrypt a string that can be of any length to maximum 10 random characters only,

    i tried a lots of encryption / decryption algorithms but all gives very long encrypted string, appreciate if anyone can share to limit the encryption string to only 10 characters provided these characters to be random each time.

    Many Thanks in Advance..... 

    Sunday, September 9, 2018 8:11 PM


  • User753101303 posted


    You'll never be able to find a real encryption algorithm that can transform data of arbitrary length to just 10 characters and then compute back the source data just from those 10 characters (else you would have as well found a compression algorithm that allows to compress whatever you want to a handful of bytes !!!)

    It seems maybe a confusion with "hashing" (ie a kind of "thumbprint" with a fixed limited size but that doesn't allow to retrieve the source data). Another option could be to use a guid as a "handle" for the source data. 

    If you need further help explain first what you are trying to do so that one could see which approach could fit.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, September 10, 2018 9:06 AM