Use !. to prevent stack overflows in zuse

This commit is contained in:
Raymond Pasco 2016-08-15 14:21:26 -04:00
parent b5dca87907
commit a1e21b9d66

View File

@ -49,7 +49,7 @@
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: section 3bB, crypto ::
::
++ aes
++ aes !.
~% %aes ..is ~
|%
++ ahem :: AES engine
@ -436,8 +436,7 @@
|= txt/@
^- @ux
=/ encrypt ~(en ecba key)
=/ blocks (add (div len 16) ?:(=((mod len 16) 0) 0 1))
=. blocks ?:(=(0 blocks) 1 blocks)
=/ blocks (add (div len 16) ?:(=((^mod len 16) 0) 0 1))
?> (gte len (met 3 txt))
%+ mix txt
%^ rsh 3 (sub (mul 16 blocks) len)
@ -458,8 +457,7 @@
|= txt/@
^- @ux
=/ encrypt ~(en ecbb key)
=/ blocks (add (div len 16) ?:(=((mod len 16) 0) 0 1))
=. blocks ?:(=(0 blocks) 1 blocks)
=/ blocks (add (div len 16) ?:(=((^mod len 16) 0) 0 1))
?> (gte len (met 3 txt))
%+ mix txt
%^ rsh 3 (sub (mul 16 blocks) len)
@ -480,8 +478,7 @@
|= txt/@
^- @ux
=/ encrypt ~(en ecbc key)
=/ blocks (add (div len 16) ?:(=((mod len 16) 0) 0 1))
=. blocks ?:(=(0 blocks) 1 blocks)
=/ blocks (add (div len 16) ?:(=((^mod len 16) 0) 0 1))
?> (gte len (met 3 txt))
%+ mix txt
%^ rsh 3 (sub (mul 16 blocks) len)