mirror of
https://github.com/uffejakobsen/acme.git
synced 2024-11-25 23:49:25 +00:00
moved rc4 code into macro
git-svn-id: https://svn.code.sf.net/p/acme-crossass/code-0/trunk@314 4df02467-bbd4-4a76-a152-e7ce94205b78
This commit is contained in:
parent
b09b484a90
commit
088c5af442
@ -1,5 +1,8 @@
|
|||||||
;ACME 0.97
|
;ACME 0.97
|
||||||
|
|
||||||
|
!ifdef lib_6502_rc4_a !eof
|
||||||
|
lib_6502_rc4_a = 1
|
||||||
|
|
||||||
; this is an implementation of the stream cipher algorithm known as RC4.
|
; this is an implementation of the stream cipher algorithm known as RC4.
|
||||||
|
|
||||||
; you need to define these symbols in your code:
|
; you need to define these symbols in your code:
|
||||||
@ -18,9 +21,9 @@
|
|||||||
; rc4_init initialise state
|
; rc4_init initialise state
|
||||||
; rc4_usekey_X use key (in key buffer, length in X) to change state
|
; rc4_usekey_X use key (in key buffer, length in X) to change state
|
||||||
; rc4_reset reset ii and jj (call between keying and processing)
|
; rc4_reset reset ii and jj (call between keying and processing)
|
||||||
; rc4_process_X de/encrypt a chunk of data buffer-to-buffer (length in X)
|
; rc4_process_X de/encrypt data from input to output buffer (length in X)
|
||||||
|
|
||||||
!zone rc4 {
|
!macro rc4_code {
|
||||||
; create shorter names
|
; create shorter names
|
||||||
.length = rc4_length
|
.length = rc4_length
|
||||||
.count = rc4_count
|
.count = rc4_count
|
||||||
@ -116,3 +119,7 @@ rc4_process_X
|
|||||||
bne ---
|
bne ---
|
||||||
rts
|
rts
|
||||||
}
|
}
|
||||||
|
|
||||||
|
!macro rc4_test {
|
||||||
|
; TODO: add code for automated testing!
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user