-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtsm.h
49 lines (33 loc) · 1.57 KB
/
tsm.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*--------------------------------------------------------------------*/
/* tsm.h */
/* Author: Gerry Wan */
/*--------------------------------------------------------------------*/
#ifndef TSM_INCLUDED
#define TSM_INCLUDED
#include "keychain.h"
/*--------------------------------------------------------------------*/
/* Generate a random 64 bit key and add it to the keychain under
the parent key. */
int AddKeyToChain(KeyChain_T oKeyChain,
char *pcParentKeyID,
char *pcKeyID,
int iType);
/*--------------------------------------------------------------------*/
/* Delete pcKeyID from the keychain. */
int DeleteKeyFromChain(KeyChain_T oKeyChain, char *pcKeyID);
/*--------------------------------------------------------------------*/
/* Encrypt inputFileName into outputFileName using pcKeyID.
Return 1 on success, 0 on failure. */
int Encrypt(const char *inputFileName,
const char *outputFileName,
KeyChain_T oKeyChain,
char *pcKeyID);
/*--------------------------------------------------------------------*/
/* Decrypt inputFileName into outputFileName using pcKeyID.
Return 1 on success, 0 on failure. */
int Decrypt(const char *inputFileName,
const char *outputFileName,
KeyChain_T oKeyChain,
char *pcKeyID);
/*--------------------------------------------------------------------*/
#endif