summaryrefslogtreecommitdiff
path: root/src/utils/encryption.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-04-23 16:46:00 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2008-04-23 16:46:00 +0000
commitcac2b7d1bd79e312e2009eca216ace2a29e60621 (patch)
treee5184238bff9c5fa85013aaab2bb13393fb105b7 /src/utils/encryption.h
parentf1b09938a52111be89e9373ad665f50d64aed46c (diff)
downloadmanaserv-cac2b7d1bd79e312e2009eca216ace2a29e60621.tar.gz
manaserv-cac2b7d1bd79e312e2009eca216ace2a29e60621.tar.bz2
manaserv-cac2b7d1bd79e312e2009eca216ace2a29e60621.tar.xz
manaserv-cac2b7d1bd79e312e2009eca216ace2a29e60621.zip
Switched to alternative SHA-256 implementation from InspIRCd.
Diffstat (limited to 'src/utils/encryption.h')
-rw-r--r--src/utils/encryption.h88
1 files changed, 39 insertions, 49 deletions
diff --git a/src/utils/encryption.h b/src/utils/encryption.h
index 0a1538db..fd67c5e1 100644
--- a/src/utils/encryption.h
+++ b/src/utils/encryption.h
@@ -1,49 +1,39 @@
-/*
- * The Mana World
- * Copyright 2008 The Mana World Development Team
- *
- * This file is part of The Mana World.
- *
- * The Mana World is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * any later version.
- *
- * The Mana World is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with The Mana World; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * $Id: $
- */
-
-#ifndef _TMW_UTILS_ENCRYPTION_H
-#define _TMW_UTILS_ENCRYPTION_H
-
-#include <string>
-
-#include "sha2.h"
-
-namespace Encryption {
-
-/** SHA256 Encryption related */
-const char SHA256HashLength = 64;
-
-/** Set the encryption strength */
-const sha2::SHA_TYPE shaType = sha2::enuSHA256;
-
-/** Create an SHA2 hash from a given string */
-std::string GetSHA2Hash(std::string stringToHash);
-
-/** Create a random string, suitable for a user to type,
- * and that doesn't break a database */
-std::string CreateRandomPassword();
-
-}
-
-#endif //TMW_UTILS_ENCRYPTION_H
-
+/*
+ * The Mana World
+ * Copyright 2008 The Mana World Development Team
+ *
+ * This file is part of The Mana World.
+ *
+ * The Mana World is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * any later version.
+ *
+ * The Mana World is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with The Mana World; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * $Id$
+ */
+
+#ifndef _TMW_UTILS_ENCRYPTION_H
+#define _TMW_UTILS_ENCRYPTION_H
+
+#include <string>
+
+namespace Encryption {
+
+/**
+ * Creates a random string, suitable for a user to type,
+ * and that doesn't break a database
+ */
+std::string createRandomPassword();
+
+}
+
+#endif // TMW_UTILS_ENCRYPTION_H