I am working for encryption and decryption using rsa algorithm ,and adding my own concept in rsa, after rsa and padding i m getting a string like-
100011234A12300A12A231A234A981A
for different input output string is increase... Is there any technique by use of that i can compact this string [ then easy store in database and retrieve and convert into real form when required]

and adding my own concept in rsa

Which, unless you're quite a skilled cryptanalyst, will probably ruin the algorithm's strength.

Is there any technique by use of that i can compact this string

A typical way to compact cipher text is converting it to a base-64 string. This has the dual benefit of making the cipher text both smaller and widely portable.

Does your string only contain the values 0-9 and the letter A? If so, you only need 4 bits to store that, which means you can pack 2 characters in each byte, halving the amount of storage required.

Does your string only contain the values 0-9 and the letter A? If so, you only need 4 bits to store that, which means you can pack 2 characters in each byte, halving the amount of storage required.

yes i have only numbers and A, how to implement your logic? give me some hint

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.