~ubuntu-branches/ubuntu/trusty/cctools/trusty-proposed

« back to all changes in this revision

Viewing changes to dttools/src/sha1.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Hanke
  • Date: 2011-07-14 14:41:37 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20110714144137-f7912jbs6esk7ffc
Tags: 3.3.3-1
* New upstream release.
* Updated Debian configuration patches.
* Added build-dependency to python-support to install the workqueue
  extension correctly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
        int Endianness;
24
24
} sha1_context_t;
25
25
 
26
 
void sha1_init( sha1_context_t *ctx );
27
 
void sha1_update( sha1_context_t *ctx, const unsigned char *, unsigned int );
28
 
void sha1_final( unsigned char digest[SHA1_DIGEST_LENGTH], sha1_context_t *ctx );
 
26
void sha1_init(sha1_context_t * ctx);
 
27
void sha1_update(sha1_context_t * ctx, const unsigned char *, unsigned int);
 
28
void sha1_final(unsigned char digest[SHA1_DIGEST_LENGTH], sha1_context_t * ctx);
29
29
 
30
30
/** Checksum a memory buffer.
31
31
Note that this function produces a digest in binary form
35
35
@param digest Pointer to a buffer to store the digest.
36
36
*/
37
37
 
38
 
void sha1_buffer( const char *buffer, int length, unsigned char digest[SHA1_DIGEST_LENGTH] );
 
38
void sha1_buffer(const char *buffer, int length, unsigned char digest[SHA1_DIGEST_LENGTH]);
39
39
 
40
40
/** Checksum a local file.
41
41
Note that this function produces a digest in binary form
45
45
@return One on success, zero on failure.
46
46
*/
47
47
 
48
 
int sha1_file( const char *filename, unsigned char digest[SHA1_DIGEST_LENGTH] );
 
48
int sha1_file(const char *filename, unsigned char digest[SHA1_DIGEST_LENGTH]);
49
49
 
50
50
/** Convert an SHA1 digest into a printable string.
51
51
@param digest A binary digest returned from @ref sha1_file.
52
52
@returns A static pointer to a human readable form of the digest.
53
53
*/
54
54
 
55
 
const char * sha1_string( unsigned char digest[SHA1_DIGEST_LENGTH] );
 
55
const char *sha1_string(unsigned char digest[SHA1_DIGEST_LENGTH]);
56
56
 
57
57
#endif