diff options
author | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-05-15 10:38:20 +0000 |
---|---|---|
committer | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-05-15 10:38:20 +0000 |
commit | 48540940b6c28bb4378abfeb500ec45a625b37b6 (patch) | |
tree | 2ef294c0763e802f91d868bdef4229b6868527de /plugins/CryptoPP/PGPw/sdk8/include/pgpHash.h | |
parent | 5c350913f011e119127baeb32a6aedeb4f0d33bc (diff) |
initial commit
git-svn-id: http://svn.miranda-ng.org/main/trunk@2 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/CryptoPP/PGPw/sdk8/include/pgpHash.h')
-rw-r--r-- | plugins/CryptoPP/PGPw/sdk8/include/pgpHash.h | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/plugins/CryptoPP/PGPw/sdk8/include/pgpHash.h b/plugins/CryptoPP/PGPw/sdk8/include/pgpHash.h new file mode 100644 index 0000000000..44225347ee --- /dev/null +++ b/plugins/CryptoPP/PGPw/sdk8/include/pgpHash.h @@ -0,0 +1,86 @@ +/*____________________________________________________________________________ + Copyright (C) 2002 PGP Corporation + All rights reserved. + + $Id: pgpHash.h,v 1.6 2002/08/06 20:11:16 dallen Exp $ +____________________________________________________________________________*/ + +#ifndef Included_pgpHashing_h /* [ */ +#define Included_pgpHashing_h + +#include "pgpPubTypes.h" + +PGP_BEGIN_C_DECLARATIONS + +/*____________________________________________________________________________ + Create a new hash of the specified algorithm. + + If the algorithm is not available then kPGPError_AlgorithmNotAvailable is + returned. +____________________________________________________________________________*/ + +PGPError PGPNewHashContext( PGPContextRef context, + PGPHashAlgorithm algorithm, + PGPHashContextRef * outRef ); + +/*____________________________________________________________________________ + Any existing intermediate hash is lost. +____________________________________________________________________________*/ + +PGPError PGPFreeHashContext( PGPHashContextRef ref ); + +/*____________________________________________________________________________ + An exact duplicate of the hash is made. +____________________________________________________________________________*/ + +PGPError PGPCopyHashContext( PGPHashContextRef ref, + PGPHashContextRef * outRef); + +/*____________________________________________________________________________ + Reset a hash as if it had been created anew. Any existing intermediate + hash is lost. +____________________________________________________________________________*/ + +PGPError PGPResetHash( PGPHashContextRef ref ); + +/*____________________________________________________________________________ + Continue the hash, accumulating an intermediate result +____________________________________________________________________________*/ + +PGPError PGPContinueHash( PGPHashContextRef ref, const void *in, + PGPSize numBytes ); + +/*____________________________________________________________________________ + Finalize the hash, depositing the result into 'hashOut'. + + After calling this routine, the hash is reset via PGPResetHash(). + If you want an intermediate result, use PGPCopyHash() and finalize the + copy. +____________________________________________________________________________*/ + +PGPError PGPFinalizeHash( PGPHashContextRef ref, void *hashOut ); + +/*____________________________________________________________________________ + Determine size of resulting hash in bytes e.g. a 160 bit hash yields 20. + Used for generic code which may not know how big a hash is being produced. + + Question: can we reasonably assume 8 bits per byte? If not, how does + PGPFinalizeHash return its result? +____________________________________________________________________________*/ + +PGPError PGPGetHashSize( PGPHashContextRef ref, PGPSize *hashSize ); + + +PGP_END_C_DECLARATIONS + +#endif /* ] Included_pgpHashing_h */ + + +/*__Editor_settings____ + + Local Variables: + tab-width: 4 + End: + vi: ts=4 sw=4 + vim: si +_____________________*/ |