summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/enc_md5.c8
-rw-r--r--src/core/enc_none.c7
-rw-r--r--src/core/enc_old.c9
-rw-r--r--src/core/enc_sha1.c16
-rw-r--r--src/encrypt.c18
5 files changed, 0 insertions, 58 deletions
diff --git a/src/core/enc_md5.c b/src/core/enc_md5.c
index b9f12ed57..59a96cae0 100644
--- a/src/core/enc_md5.c
+++ b/src/core/enc_md5.c
@@ -362,12 +362,6 @@ int md5_encrypt(const char *src, int len, char *dest, int size)
}
-int md5_encrypt_in_place(char *buf, int size)
-{
- return md5_encrypt(buf, strlen(buf), buf, size);
-}
-
-
int md5_encrypt_check_len(int passlen, int bufsize)
{
if (bufsize < 16)
@@ -404,7 +398,6 @@ int AnopeInit(int argc, char **argv) {
moduleSetType(ENCRYPTION);
encmodule_encrypt(md5_encrypt);
- encmodule_encrypt_in_place(md5_encrypt_in_place);
encmodule_encrypt_check_len(md5_encrypt_check_len);
encmodule_decrypt(md5_decrypt);
encmodule_check_password(md5_check_password);
@@ -414,7 +407,6 @@ int AnopeInit(int argc, char **argv) {
void AnopeFini(void) {
encmodule_encrypt(NULL);
- encmodule_encrypt_in_place(NULL);
encmodule_encrypt_check_len(NULL);
encmodule_decrypt(NULL);
encmodule_check_password(NULL);
diff --git a/src/core/enc_none.c b/src/core/enc_none.c
index aa5fd0a96..0a6bb694e 100644
--- a/src/core/enc_none.c
+++ b/src/core/enc_none.c
@@ -10,7 +10,6 @@
#include "module.h"
int plain_encrypt(const char *src,int len,char *dest,int size);
-int plain_encrypt_in_place(char *buf, int size);
int plain_encrypt_check_len(int passlen, int bufsize);
int plain_decrypt(const char *src, char *dest, int size);
int plain_check_password(const char *plaintext, const char *password);
@@ -23,7 +22,6 @@ int AnopeInit(int argc, char **argv) {
moduleSetType(ENCRYPTION);
encmodule_encrypt(plain_encrypt);
- encmodule_encrypt_in_place(plain_encrypt_in_place);
encmodule_encrypt_check_len(plain_encrypt_check_len);
encmodule_decrypt(plain_decrypt);
encmodule_check_password(plain_check_password);
@@ -33,7 +31,6 @@ int AnopeInit(int argc, char **argv) {
void AnopeFini(void) {
encmodule_encrypt(NULL);
- encmodule_encrypt_in_place(NULL);
encmodule_encrypt_check_len(NULL);
encmodule_decrypt(NULL);
encmodule_check_password(NULL);
@@ -49,10 +46,6 @@ int plain_encrypt(const char *src,int len,char *dest,int size) {
return -1;
}
-int plain_encrypt_in_place(char *buf, int size) {
- return 0;
-}
-
int plain_encrypt_check_len(int passlen, int bufsize) {
if(bufsize>=passlen) {
return 0;
diff --git a/src/core/enc_old.c b/src/core/enc_old.c
index be593e367..8040c2906 100644
--- a/src/core/enc_old.c
+++ b/src/core/enc_old.c
@@ -388,13 +388,6 @@ int old_encrypt(const char *src, int len, char *dest, int size)
}
-
-/* Shortcut for encrypting a null-terminated string in place. */
-int old_encrypt_in_place(char *buf, int size)
-{
- return old_encrypt(buf, strlen(buf), buf, size);
-}
-
int old_encrypt_check_len(int passlen, int bufsize)
{
if (bufsize < 16)
@@ -430,7 +423,6 @@ int AnopeInit(int argc, char **argv) {
moduleSetType(ENCRYPTION);
encmodule_encrypt(old_encrypt);
- encmodule_encrypt_in_place(old_encrypt_in_place);
encmodule_encrypt_check_len(old_encrypt_check_len);
encmodule_decrypt(old_decrypt);
encmodule_check_password(old_check_password);
@@ -440,7 +432,6 @@ int AnopeInit(int argc, char **argv) {
void AnopeFini(void) {
encmodule_encrypt(NULL);
- encmodule_encrypt_in_place(NULL);
encmodule_encrypt_check_len(NULL);
encmodule_decrypt(NULL);
encmodule_check_password(NULL);
diff --git a/src/core/enc_sha1.c b/src/core/enc_sha1.c
index 4ab4afcdb..3fa08fc73 100644
--- a/src/core/enc_sha1.c
+++ b/src/core/enc_sha1.c
@@ -204,20 +204,6 @@ int sha1_encrypt(const char *src, int len, char *dest, int size)
}
-int sha1_encrypt_in_place(char *buf, int size)
-{
- char tmp[41];
-
- memset(tmp,0,41);
- if(sha1_encrypt(buf, strlen(buf), tmp, size)==0) {
- memcpy(buf, tmp, size);
- } else {
- return -1;
- }
- return 0;
-}
-
-
int sha1_encrypt_check_len(int passlen, int bufsize)
{
if (bufsize < 20)
@@ -255,7 +241,6 @@ int AnopeInit(int argc, char **argv) {
moduleSetType(ENCRYPTION);
encmodule_encrypt(sha1_encrypt);
- encmodule_encrypt_in_place(sha1_encrypt_in_place);
encmodule_encrypt_check_len(sha1_encrypt_check_len);
encmodule_decrypt(sha1_decrypt);
encmodule_check_password(sha1_check_password);
@@ -265,7 +250,6 @@ int AnopeInit(int argc, char **argv) {
void AnopeFini(void) {
encmodule_encrypt(NULL);
- encmodule_encrypt_in_place(NULL);
encmodule_encrypt_check_len(NULL);
encmodule_decrypt(NULL);
encmodule_check_password(NULL);
diff --git a/src/encrypt.c b/src/encrypt.c
index 2c85d444a..0555c221a 100644
--- a/src/encrypt.c
+++ b/src/encrypt.c
@@ -23,11 +23,6 @@ void encmodule_encrypt(int (*func)
encryption.encrypt = func;
}
-void encmodule_encrypt_in_place(int (*func) (char *buf, int size))
-{
- encryption.encrypt_in_place = func;
-}
-
void encmodule_encrypt_check_len(int (*func) (int passlen, int bufsize))
{
encryption.encrypt_check_len = func;
@@ -60,19 +55,6 @@ int enc_encrypt(const char *src, int len, char *dest, int size)
return -1;
}
-/**
- * Encrypt null-terminated string stored in buffer `buf' of size `size',
- * placing the result in the same buffer. Returns 0 on success, -1 on
- * error.
- **/
-int enc_encrypt_in_place(char *buf, int size)
-{
- if (encryption.encrypt_in_place) {
- return encryption.encrypt_in_place(buf, size);
- }
- return -1;
-}
-
/**
* Check whether the result of encrypting a password of length `passlen'
* will fit in a buffer of size `bufsize'. Returns 0 if the encrypted