annotate demos/small.c @ 162:bc4e3ac2dd5a libtomcrypt

make data pointers volatile so that memory zeroing won't get optimised away
author Matt Johnston <matt@ucc.asn.au>
date Sun, 02 Jan 2005 17:09:05 +0000
parents b939f2d4431e
children 9cc34777b479
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
20
b939f2d4431e Include files accidentally zeroed when merging 0.96 release
Matt Johnston <matt@ucc.asn.au>
parents: 16
diff changeset
1 // small demo app that just includes a cipher/hash/prng
b939f2d4431e Include files accidentally zeroed when merging 0.96 release
Matt Johnston <matt@ucc.asn.au>
parents: 16
diff changeset
2
b939f2d4431e Include files accidentally zeroed when merging 0.96 release
Matt Johnston <matt@ucc.asn.au>
parents: 16
diff changeset
3 #include <mycrypt.h>
b939f2d4431e Include files accidentally zeroed when merging 0.96 release
Matt Johnston <matt@ucc.asn.au>
parents: 16
diff changeset
4
b939f2d4431e Include files accidentally zeroed when merging 0.96 release
Matt Johnston <matt@ucc.asn.au>
parents: 16
diff changeset
5 int main(void)
b939f2d4431e Include files accidentally zeroed when merging 0.96 release
Matt Johnston <matt@ucc.asn.au>
parents: 16
diff changeset
6 {
b939f2d4431e Include files accidentally zeroed when merging 0.96 release
Matt Johnston <matt@ucc.asn.au>
parents: 16
diff changeset
7 register_cipher(&rijndael_enc_desc);
b939f2d4431e Include files accidentally zeroed when merging 0.96 release
Matt Johnston <matt@ucc.asn.au>
parents: 16
diff changeset
8 register_prng(&yarrow_desc);
b939f2d4431e Include files accidentally zeroed when merging 0.96 release
Matt Johnston <matt@ucc.asn.au>
parents: 16
diff changeset
9 register_hash(&sha256_desc);
b939f2d4431e Include files accidentally zeroed when merging 0.96 release
Matt Johnston <matt@ucc.asn.au>
parents: 16
diff changeset
10 return 0;
b939f2d4431e Include files accidentally zeroed when merging 0.96 release
Matt Johnston <matt@ucc.asn.au>
parents: 16
diff changeset
11 }