]> git.cryptolib.org Git - arm-crypto-lib.git/blobdiff - host/data2wiki.rb
fixing sha256
[arm-crypto-lib.git] / host / data2wiki.rb
index 932d26364d8b908824893a130e40f5c4640ab7c3..15012315e0995b9576fbd601b7377589f31aa110 100644 (file)
@@ -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)