954,483 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

how to compact a char-numeric variable string

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]

rohitamitpathak
Newbie Poster
4 posts since Mar 2011
Reputation Points: 10
Solved Threads: 0
 
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.

Narue
Bad Cop
Administrator
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
 

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.

Momerath
Nearly a Senior Poster
3,384 posts since Aug 2010
Reputation Points: 1,232
Solved Threads: 558
 
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

rohitamitpathak
Newbie Poster
4 posts since Mar 2011
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: