Coda Distributed File System
getsecret.h
Go to the documentation of this file.
1/* BLURB gpl
2
3 Coda File System
4 Release 6
5
6 Copyright (c) 1987-2003 Carnegie Mellon University
7 Additional copyrights listed below
8
9This code is distributed "AS IS" without warranty of any kind under
10the terms of the GNU General Public Licence Version 2, as shown in the
11file LICENSE. The technical and financial contributors to Coda are
12listed in the file CREDITS.
13
14 Additional copyrights
15
16#*/
17
18#ifndef _GETSECRET_H_
19#define _GETSECRET_H_
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25#include <sys/types.h>
26#include <rpc2/rpc2.h>
27
28/* Copy the hash of 'secret' into the RPC2 key */
29void HashSecret(unsigned char *secret, int len, RPC2_EncryptionKey key);
30
31/* to avoid having to re-read and re-hash tokens from files... */
33 time_t mtime;
35};
36/* Read a tokenfile and return an RPC2 encryption key. */
37int GetSecret(const char *file, RPC2_EncryptionKey key,
38 struct secret_state *state);
39
40/* Fill the RPC2 key with random values (for session keys) */
42
43#ifdef __cplusplus
44}
45#endif
46
47#endif /* _GETSECRET_H_ */
FILE * file
Definition: dirtest.c:723
void HashSecret(unsigned char *secret, int len, RPC2_EncryptionKey key)
Definition: getsecret.cc:41
void GenerateSecret(RPC2_EncryptionKey key)
Definition: getsecret.cc:97
int GetSecret(const char *file, RPC2_EncryptionKey key, struct secret_state *state)
Definition: getsecret.cc:53
RPC2_Byte RPC2_EncryptionKey[RPC2_KEYSIZE]
Definition: rpc2.h:336
Definition: getsecret.h:32
RPC2_EncryptionKey key
Definition: getsecret.h:34
time_t mtime
Definition: getsecret.h:33