f52532f8af7a6aef2a41d28cb40b916c2d0855ce
2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
12 * COMPONENT_NAME: Delite Gateway
20 * SHA is defined to work on unsigned 32 bit integers.
21 * These values should therefore not change.
23 typedef afs_uint32 sha_int
;
25 #define SHA_BITS_PER_INT 32
26 #define SHA_CHUNK_BITS 512
27 #define SHA_CHUNK_BYTES 64
28 #define SHA_CHUNK_INTS 16
29 #define SHA_HASH_BITS 160
30 #define SHA_HASH_BYTES 20
31 #define SHA_HASH_INTS 5
35 typedef struct shaState
{
36 sha_int digest
[SHA_HASH_INTS
];
40 char leftover
[SHA_CHUNK_BYTES
];
44 void sha_clear(shaState
* shaStateP
);
45 void sha_update(shaState
* shaStateP
, const char *buffer
, int bufferLen
);
46 void sha_finish(shaState
* shaStateP
);
47 void sha_hash(shaState
* shaStateP
, const char *buffer
, int bufferLen
);
48 void sha_bytes(const shaState
* shaStateP
, char *bytes
);
50 extern afs_int32
nsafs_SetToken(struct ktc_principal
*aserver
,
51 struct ktc_token
*atoken
,
52 struct ktc_principal
*aclient
,
55 #endif /* _NSAFS_H_ */