X-Git-Url: https://git.cryptolib.org/?p=arm-crypto-lib.git;a=blobdiff_plain;f=host%2Fshavs_test2.rb;h=fadbcb5904572bd1363899ebbf2051d7721aaf53;hp=ab901927b4f5a4ec2bb4eec7d92f4506d05e8303;hb=61b5214b9a948a74fe9c22586b84d19d24537fdb;hpb=5f46191d2615ebe2caa6e111b478031a34f20b9e diff --git a/host/shavs_test2.rb b/host/shavs_test2.rb index ab90192..fadbcb5 100644 --- a/host/shavs_test2.rb +++ b/host/shavs_test2.rb @@ -1,7 +1,7 @@ #!/usr/bin/ruby # shavs_test.rb =begin - This file is part of the AVR-Crypto-Lib. + This file is part of the ARM-Crypto-Lib. Copyright (C) 2008, 2009 Daniel Otte (daniel.otte@rub.de) This program is free software: you can redistribute it and/or modify @@ -122,20 +122,37 @@ end ################################################################################ # send_md # ################################################################################ - +=begin def send_md(md_string) $sp.print("Msg = ") for i in 0..md_string.length-1 $sp.print(md_string[i].chr) -# print("DBG s: "+ md_string[i].chr) if $debug -# sleep(0.001) - if((i%($buffer_size*2)==0)&&(i!=0)) - begin - line=$sp.gets() - end while not /\./.match(line) - end + if((i%($buffer_size*2)==0)&&(i!=0)) + begin + line=$sp.gets() + end while not /\./.match(line) + end end end +=end +def send_md(md_string) +# puts 'DBG: send_md; md_string.length = '+md_string.length.to_s+'; buffer_size = '+$buffer_size.to_s + bs = $buffer_size*2 + $sp.print("Msg = ") + for i in 0..((md_string.length-1)/bs) +# puts 'DBG bulk send' + if(md_string.length-i*bs