encryption any text of alphapets and numbers into a random characters
; do you want later to decrypt it back or no?
low_coder
Junior Poster in Training
55 posts since Nov 2008
Reputation Points: 40
Solved Threads: 4
Start simple - write a program which just copies the file, one character at a time.
Until you can do that reliably, there's no point trying to implement a crypt/decrypt, because you'll have no way to test it.
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
; here is a simple encrypting/decrypting app.:
; on encryption it will just inc hex values represented byeach char
; on decryption dec
.386
.model flat,stdcall
option casemap:none
include \masm32\include\windows.inc
include \masm32\include\user32.inc
include \masm32\include\kernel32.inc
include \masm32\include\masm32.inc
includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\masm32.lib
.data?
szBuff db 256 dup(?)
.code
start:
invoke AllocConsole
invoke StdIn, ADDR szBuff, sizeof szBuff
lblCrypt:
mov eax, offset szBuff
@@:
cmp byte ptr [eax],0
je lblPrint
inc byte ptr [eax]
inc eax
jmp @B
lblPrint:
mov eax, offset szBuff
invoke StdOut, ADDR szBuff
lblDecrypt:
mov eax, offset szBuff
@@:
cmp byte ptr [eax],0
je lblExit
dec byte ptr [eax]
inc eax
jmp @B
lblExit:
mov eax, offset szBuff
invoke StdOut, ADDR szBuff
invoke ExitProcess, 0
end start
low_coder
Junior Poster in Training
55 posts since Nov 2008
Reputation Points: 40
Solved Threads: 4