| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Encrypt/decrypt plugin using DES-CBC. | 2 * Encrypt/decrypt plugin using DES-CBC. |
| 3 * | 3 * |
| 4 * Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 4 * Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #ifdef HAVE_CONFIG_H | 9 #ifdef HAVE_CONFIG_H |
| 10 #include <config.h> | 10 #include <config.h> |
| 11 #endif | 11 #endif |
| 12 | 12 |
| 13 #define CONNMAN_API_SUBJECT_TO_CHANGE | 13 #define CONNMAN_API_SUBJECT_TO_CHANGE |
| 14 #include <connman/crypto.h> |
| 15 #include <connman/log.h> |
| 16 #include <connman/option.h> |
| 14 #include <connman/plugin.h> | 17 #include <connman/plugin.h> |
| 15 #include <connman/crypto.h> | |
| 16 #include <connman/option.h> | |
| 17 #include <errno.h> | 18 #include <errno.h> |
| 18 #include <glib.h> | 19 #include <glib.h> |
| 19 #include <string.h> | 20 #include <string.h> |
| 20 | 21 |
| 21 #include <rpc/des_crypt.h> | 22 #include <rpc/des_crypt.h> |
| 22 | 23 |
| 23 #define BLOCK_SIZE 8 | 24 #define BLOCK_SIZE 8 |
| 24 | 25 |
| 25 static gboolean initialized = FALSE; | 26 static gboolean initialized = FALSE; |
| 26 static char des_key[BLOCK_SIZE]; | 27 static char des_key[BLOCK_SIZE]; |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 | 240 |
| 240 static void descbc_finish(void) | 241 static void descbc_finish(void) |
| 241 { | 242 { |
| 242 if (initialized) | 243 if (initialized) |
| 243 connman_crypto_unregister(&crypto_descbc); | 244 connman_crypto_unregister(&crypto_descbc); |
| 244 } | 245 } |
| 245 | 246 |
| 246 CONNMAN_PLUGIN_DEFINE(crypto_rot47, "DES-CBC Plugin", VERSION, | 247 CONNMAN_PLUGIN_DEFINE(crypto_rot47, "DES-CBC Plugin", VERSION, |
| 247 CONNMAN_PLUGIN_PRIORITY_DEFAULT, descbc_init, | 248 CONNMAN_PLUGIN_PRIORITY_DEFAULT, descbc_init, |
| 248 descbc_finish) | 249 descbc_finish) |
| OLD | NEW |