OLD | NEW |
1 /* | 1 /* |
2 * Rot-47 "encryption", obfuscates sensitive data so that it's not visible | 2 * Rot-47 "encryption", obfuscates sensitive data so that it's not visible |
3 * on accident. | 3 * on accident. |
4 * | 4 * |
5 * Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 5 * Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
6 * Use of this source code is governed by a BSD-style license that can be | 6 * Use of this source code is governed by a BSD-style license that can be |
7 * found in the LICENSE file. | 7 * found in the LICENSE file. |
8 */ | 8 */ |
9 | 9 |
10 #ifdef HAVE_CONFIG_H | 10 #ifdef HAVE_CONFIG_H |
11 #include <config.h> | 11 #include <config.h> |
12 #endif | 12 #endif |
13 | 13 |
14 #define CONNMAN_API_SUBJECT_TO_CHANGE | 14 #define CONNMAN_API_SUBJECT_TO_CHANGE |
| 15 #include <connman/crypto.h> |
| 16 #include <connman/log.h> |
15 #include <connman/plugin.h> | 17 #include <connman/plugin.h> |
16 #include <connman/crypto.h> | |
17 #include <glib.h> | 18 #include <glib.h> |
18 #include <string.h> | 19 #include <string.h> |
19 | 20 |
20 #define ROT_SIZE 94 | 21 #define ROT_SIZE 94 |
21 #define ROT_HALF (ROT_SIZE / 2) | 22 #define ROT_HALF (ROT_SIZE / 2) |
22 #define ROT_MIN '!' | 23 #define ROT_MIN '!' |
23 #define ROT_MAX (ROT_MIN + ROT_SIZE) | 24 #define ROT_MAX (ROT_MIN + ROT_SIZE) |
24 | 25 |
25 static char *rotate_encrypt(const char *profile_name, | 26 static char *rotate_encrypt(const char *profile_name, |
26 const char *key, const char *value); | 27 const char *key, const char *value); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 } | 66 } |
66 | 67 |
67 static void rotate_finish(void) | 68 static void rotate_finish(void) |
68 { | 69 { |
69 connman_crypto_unregister(&crypto_rot47); | 70 connman_crypto_unregister(&crypto_rot47); |
70 } | 71 } |
71 | 72 |
72 CONNMAN_PLUGIN_DEFINE(crypto_rot47, "Rot47 Plugin", VERSION, | 73 CONNMAN_PLUGIN_DEFINE(crypto_rot47, "Rot47 Plugin", VERSION, |
73 CONNMAN_PLUGIN_PRIORITY_DEFAULT, rotate_init, | 74 CONNMAN_PLUGIN_PRIORITY_DEFAULT, rotate_init, |
74 rotate_finish) | 75 rotate_finish) |
OLD | NEW |