X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=host%2Fdata2wiki.rb;h=15012315e0995b9576fbd601b7377589f31aa110;hb=4f19c43af8afeb3c569eb7b4aa15907832cf8e5c;hp=932d26364d8b908824893a130e40f5c4640ab7c3;hpb=5f46191d2615ebe2caa6e111b478031a34f20b9e;p=arm-crypto-lib.git diff --git a/host/data2wiki.rb b/host/data2wiki.rb index 932d263..1501231 100644 --- a/host/data2wiki.rb +++ b/host/data2wiki.rb @@ -2,7 +2,7 @@ # performnce to wiki =begin - This file is part of the AVR-Crypto-Lib. + This file is part of the ARM-Crypto-Lib. Copyright (C) 2009 Daniel Otte (daniel.otte@rub.de) This program is free software: you can redistribute it and/or modify @@ -111,9 +111,9 @@ def process_hashfunction(fin, name, impl) stack = 0 end size = get_size_string(impl, name) - printf("| %20s || %3s || %3s || %6d || %7d || %7d || %7d || %7d ||" + + printf("| %20s || %6s || %3s || %6d || %7d || %7s || %7d || %7d ||" + " %7d || %7d || %9.2f || %7d || || || \n|-\n" , - name, $lang, $lang, size, ctxsize, stack, hashsize, blocksize, + name, $variant, $lang, size, ctxsize, '', hashsize, blocksize, inittime, nextblocktime, nextblocktime.to_f/(blocksize/8), lastblocktime+convtime) end @@ -125,9 +125,16 @@ $handlers["hashfunction"] = 1 #process_hashfunction def process_file(fname) fin = File.open(fname, "r") - $lang = "asm" - $lang = "C" if fname.match(/_c.txt$/) impl = fname.match(/([^.]*).txt$/)[1] + $lang = "asm" + $lang = "C" if impl.match(/^[^_]*_[cC]/) + $variant = $lang + if m=impl.match(/_([^_]*)$/) + $variant = m[1] + end + if $variant == 'c' + $variant = 'C' + end begin begin if fin.eof() @@ -141,7 +148,7 @@ def process_file(fname) type = m[1] if $handlers[type] != 0 # handlers[type](fin, name) - # puts "DBG: process "+'-'+name+'-'+impl + # puts "DBG: process "fname+'-'+name+'-'+impl process_hashfunction(fin, name, impl) else printf("ERROR: unsupported type: %s !\n", type)