Encrypt text for printing, so the result is still available for printing (can be printed)

I want to encrypt some information for the licensing system, and I want the result to be entered by the user.

Update: This operation must be reversible (decrypt) For example. Encryption (ComputerID + ProductID) → (any standard ASCII character that can be entered. Ideally, maybe even just AZ).

So far, I have done this to convert ciphertext to HEX (so this is any character from 0-F), but it doubles the number of characters.

I am using VB6.

I think that I will perform some operation on each pair (Input $ (x) and Key $ (x)) and then do MOD to keep it within the range of ascii values ​​(possibly 0-9-AZ)

Any suggestions for a good algorithm?

+3
source share
3 answers

Take a look at Base64 encryption.

Base 64 converts a number into 64 different ASCII characters, hexadecimal verses that contain only 16 different ASCII characters ... Making Base64 more compact and what you are looking for.

EDIT: The code for this in VB6 can be found here: http://www.nonhostile.com/howto-encode-decode-base64-vb6.asp

In Fuzzy Lollipop below Base32 looks even better. Bonus points if you can find an example of this.

EDIT: I found a Base32 example for VB6 , although I haven't tried it yet. -Clay

+5
source

HEX Base32 Base64

+2

, - ? , , .

XOR ( , Unicode), , , . Base N (32, 64 ..) .

: XORed Base N, XOR , .

, . XOR .

0

Source: https://habr.com/ru/post/1729722/


All Articles