From 3a0ab781f7853d1638ebe07b2a5f515b49a4e402 Mon Sep 17 00:00:00 2001 From: Unbewohnte Date: Fri, 17 Jan 2025 12:33:11 +0300 Subject: [PATCH] REMOVAL: Removed TODO and deprecated package --- TODO | 4 ---- src/misc/encryption.go | 43 ------------------------------------------ 2 files changed, 47 deletions(-) delete mode 100644 TODO delete mode 100644 src/misc/encryption.go diff --git a/TODO b/TODO deleted file mode 100644 index d6688e0..0000000 --- a/TODO +++ /dev/null @@ -1,4 +0,0 @@ -1) Профиль -3) Темная/Светлая тема - -Не SQLite3 \ No newline at end of file diff --git a/src/misc/encryption.go b/src/misc/encryption.go deleted file mode 100644 index 6a98a7a..0000000 --- a/src/misc/encryption.go +++ /dev/null @@ -1,43 +0,0 @@ -/* - dela - web TODO list - Copyright (C) 2023 Kasyanov Nikolay Alexeyevich (Unbewohnte) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program 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 Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . -*/ - -package misc - -import ( - "crypto/sha256" - "encoding/base64" - "fmt" -) - -// Encodes given string via Base64 -func EncodeString(str string) string { - return base64.StdEncoding.EncodeToString([]byte(str)) -} - -// Decodes given string via Base64 -func DecodeString(encodedStr string) string { - decodedBytes, _ := base64.StdEncoding.DecodeString(encodedStr) - return string(decodedBytes) -} - -// Returns HEX string of SHA256'd data -func SHA256Hex(data []byte) string { - hash := sha256.New() - hash.Write(data) - return fmt.Sprintf("%x", hash.Sum(nil)) -}