~ubuntu-branches/ubuntu/hardy/mysql-dfsg-5.0/hardy-proposed

« back to all changes in this revision

Viewing changes to extra/yassl/taocrypt/benchmark/benchmark.cpp

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-03-28 09:25:59 UTC
  • mfrom: (1.1.17)
  • Revision ID: package-import@ubuntu.com-20120328092559-yru056zrm98qcs3m
Tags: 5.0.96-0ubuntu1
* SECURITY UPDATE: Update to 5.0.96 to fix security issues (LP: #965523)
  - http://dev.mysql.com/doc/refman/5.0/en/news-5-0-96.html

Show diffs side-by-side

added added

removed removed

Lines of Context:
117
117
 
118
118
    double persec = 1 / total * megs;
119
119
 
120
 
    printf("3DES     %d megs took %5.3f seconds, %5.2f MB/s\n", megs, total,
 
120
    printf("3DES     %d megs took %5.3f seconds, %6.2f MB/s\n", megs, total,
121
121
                                                             persec);
122
122
}
123
123
 
137
137
    double persec = 1 / total * megs;
138
138
 
139
139
    if (show)
140
 
        printf("AES      %d megs took %5.3f seconds, %5.2f MB/s\n", megs, total,
 
140
        printf("AES      %d megs took %5.3f seconds, %6.2f MB/s\n", megs, total,
141
141
                                                                 persec);
142
142
}
143
143
 
156
156
 
157
157
    double persec = 1 / total * megs;
158
158
 
159
 
    printf("Twofish  %d megs took %5.3f seconds, %5.2f MB/s\n", megs, total,
 
159
    printf("Twofish  %d megs took %5.3f seconds, %6.2f MB/s\n", megs, total,
160
160
                                                            persec);
161
161
 
162
162
}
176
176
 
177
177
    double persec = 1 / total * megs;
178
178
 
179
 
    printf("Blowfish %d megs took %5.3f seconds, %5.2f MB/s\n", megs, total,
 
179
    printf("Blowfish %d megs took %5.3f seconds, %6.2f MB/s\n", megs, total,
180
180
                                                             persec);
181
181
}
182
182
 
195
195
 
196
196
    double persec = 1 / total * megs;
197
197
 
198
 
    printf("ARC4     %d megs took %5.3f seconds, %5.2f MB/s\n", megs, total,
 
198
    printf("ARC4     %d megs took %5.3f seconds, %6.2f MB/s\n", megs, total,
199
199
                                                             persec);
200
200
}
201
201
 
217
217
 
218
218
    double persec = 1 / total * megs;
219
219
 
220
 
    printf("MD5      %d megs took %5.3f seconds, %5.2f MB/s\n", megs, total,
 
220
    printf("MD5      %d megs took %5.3f seconds, %6.2f MB/s\n", megs, total,
221
221
                                                             persec);
222
222
}
223
223
 
245
245
 
246
246
    double persec = 1 / total * megs;
247
247
 
248
 
    printf("SHA      %d megs took %5.3f seconds, %5.2f MB/s\n", megs, total,
 
248
    printf("SHA      %d megs took %5.3f seconds, %6.2f MB/s\n", megs, total,
249
249
                                                             persec);
250
250
}
251
251
 
267
267
 
268
268
    double persec = 1 / total * megs;
269
269
 
270
 
    printf("RIPEMD   %d megs took %5.3f seconds, %5.2f MB/s\n", megs, total,
 
270
    printf("RIPEMD   %d megs took %5.3f seconds, %6.2f MB/s\n", megs, total,
271
271
                                                             persec);
272
272
}
273
273
 
290
290
    byte      message[] = "Everyone gets Friday off.";
291
291
    byte      cipher[128];  // for 1024 bit
292
292
    byte      plain[128];   // for 1024 bit
293
 
    const int len = strlen((char*)message);
 
293
    const int len = (word32)strlen((char*)message);
294
294
    
295
295
    int i;    
296
296
    double start = current_time();