3 ms·
People who are interested in low-level language implementation might wish to learn a little dc, because its ability to easily produce arbitrary binary output ma
by 082349872349872 4y ago
People who are interested in low-level language implementation might wish to learn a little dc, because its ability to easily produce arbitrary binary output may come in handy when boostrapping.
- shagie 4y agoThere was that old RSA in a sig file... #!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj $/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1 lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/) You'll note on that last line a |dc` as all of that stuff after the `echo` gets packed into something for dc to run. http://www.cypherspace.org/adam/rsa/rsa-details.html http://www.cypherspace.org/adam/rsa/rsa-details.html