File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -74,19 +74,19 @@ private static byte[] generateTestData(int size) {
7474 return new byte [size ];
7575 }
7676
77+ /* Bytes sizes from WC_*_DIGEST_SIZE for corresponding algorithm in text.c */
7778 private static int getHmacKeySize (String algorithm ) {
78- // Key sizes in bytes based on hash block sizes
7979 switch (algorithm ) {
8080 case "HmacMD5" :
81- return 64 ;
81+ return 16 ;
8282 case "HmacSHA1" :
83- return 64 ;
83+ return 20 ;
8484 case "HmacSHA256" :
85- return 64 ;
85+ return 32 ;
8686 case "HmacSHA384" :
87- return 128 ;
87+ return 48 ;
8888 case "HmacSHA512" :
89- return 128 ;
89+ return 64 ;
9090 default :
9191 throw new IllegalArgumentException ("Unsupported HMAC algorithm: " + algorithm );
9292 }
@@ -176,7 +176,7 @@ private static void printDeltaTable() {
176176 }
177177 }
178178 System .out .println ("--------------------------------------------------------------------------------" );
179- System .out .println ("* Delta Value: MiB/s for symmetric ciphers, operations/second for RSA" );
179+ System .out .println ("* Delta Value: MiB/s for symmetric ciphers, operations/second for RSA and ECC " );
180180 }
181181
182182 /* Run symmetric encryption/decryption benchmarks */
You can’t perform that action at this time.
0 commit comments