0de619595f362788111eb24654a2c5749b74b782
[paraslash.git] / gcrypt.c
1 /*
2 * Copyright (C) 2011 Andre Noll <maan@systemlinux.org>
3 *
4 * Licensed under the GPL v2. For licencing details see COPYING.
5 */
6
7 /** \file gcrypt.c Libgrcypt-based encryption/decryption routines. */
8
9 #include <regex.h>
10 #include <sys/types.h>
11 #include <sys/socket.h>
12
13 #include "para.h"
14 #include "error.h"
15 #include "string.h"
16 #include "crypt.h"
17 #include "fd.h"
18
19 struct asymmetric_key {
20 int x;
21 };
22
23 void get_random_bytes_or_die(unsigned char *buf, int num)
24 {
25 }
26
27 void init_random_seed_or_die(void)
28 {
29 }
30
31 int get_asymmetric_key(const char *key_file, int private,
32 struct asymmetric_key **result)
33 {
34 return 0;
35 }
36
37 void free_asymmetric_key(struct asymmetric_key *key)
38 {
39 }
40
41 int priv_decrypt(const char *key_file, unsigned char *outbuf,
42 unsigned char *inbuf, int inlen)
43 {
44 return 0;
45 }
46
47 int pub_encrypt(struct asymmetric_key *pub, unsigned char *inbuf,
48 unsigned len, unsigned char *outbuf)
49 {
50 return 0;
51 }
52
53 struct stream_cipher {
54 int x;
55 };
56
57 struct stream_cipher *sc_new(const unsigned char *data, int len)
58 {
59 return NULL;
60 }
61
62 void sc_free(struct stream_cipher *sc)
63 {
64 }
65
66 int sc_send_bin_buffer(struct stream_cipher_context *scc, const char *buf,
67 size_t len)
68 {
69 return 0;
70 }
71
72 int sc_send_buffer(struct stream_cipher_context *scc, const char *buf)
73 {
74 return 0;
75 }
76
77 __printf_2_3 int sc_send_va_buffer(struct stream_cipher_context *scc,
78 const char *fmt, ...)
79 {
80 return 0;
81 }
82
83 int sc_recv_bin_buffer(struct stream_cipher_context *scc, char *buf,
84 size_t size)
85 {
86 return 0;
87 }
88
89 int sc_recv_buffer(struct stream_cipher_context *scc, char *buf, size_t size)
90 {
91 return 0;
92 }
93
94 void hash_function(const char *data, unsigned long len, unsigned char *hash)
95 {
96 }