along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
- * \file des.c
- * \author Daniel Otte
- * \date 2007-06-16
- * \brief DES and EDE-DES implementation
+ * \file des.c
+ * \author Daniel Otte
+ * \email daniel.otte@rub.de
+ * \date 2007-06-16
+ * \brief DES and EDE-DES implementation
* \par License
- * GPL
+ * GPLv3 or later
*
*/
#include "config.h"
/******************************************************************************/
-void des_encrypt(uint8_t* out, uint8_t* in, uint8_t* key){
+void des_enc(uint8_t* out, uint8_t* in, uint8_t* key){
#define R *((uint32_t*)&(data[4]))
#define L *((uint32_t*)&(data[0]))
/******************************************************************************/
-void des_decrypt(uint8_t* out, uint8_t* in, uint8_t* key){
+void des_dec(uint8_t* out, uint8_t* in, uint8_t* key){
#define R *((uint32_t*)&(data[4]))
#define L *((uint32_t*)&(data[0]))
/******************************************************************************/
-void tdes_encrypt(uint8_t* out, uint8_t* in, uint8_t* key){
- des_encrypt(out, in, key + 0);
- des_decrypt(out, out, key + 8);
- des_encrypt(out, out, key +16);
+void tdes_enc(uint8_t* out, uint8_t* in, uint8_t* key){
+ des_enc(out, in, key + 0);
+ des_dec(out, out, key + 8);
+ des_enc(out, out, key +16);
}
/******************************************************************************/
-void tdes_decrypt(uint8_t* out, uint8_t* in, uint8_t* key){
- des_decrypt(out, in, key + 0);
- des_encrypt(out, out, key + 8);
- des_decrypt(out, out, key +16);
+void tdes_dec(uint8_t* out, uint8_t* in, uint8_t* key){
+ des_dec(out, in, key + 0);
+ des_enc(out, out, key + 8);
+ des_dec(out, out, key +16);
}
/******************************************************************************/