From b097342a8231330d556de52c4b5d582de6feb671 Mon Sep 17 00:00:00 2001 From: tcsenpai Date: Sun, 11 Feb 2024 00:10:14 +0100 Subject: [PATCH] proper credits --- src/libs/seedable_aes.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libs/seedable_aes.py b/src/libs/seedable_aes.py index 1ac8095..845ba3e 100644 --- a/src/libs/seedable_aes.py +++ b/src/libs/seedable_aes.py @@ -3,6 +3,7 @@ import hashlib from Crypto import Random from Crypto.Cipher import AES +# LINK Implementation of seedable AES encryption thanks to: https://stackoverflow.com/a/21928790 class AESCipher(object): def __init__(self, key): @@ -28,9 +29,10 @@ class AESCipher(object): def _unpad(s): return s[:-ord(s[len(s)-1:])] -# Implementable methods -# NOTE The cipher is initialized on the fly, so the seed is not stored +# SECTION implementable methods +# NOTE The cipher is initialized on the fly, so the seed is not stored + def self_encrypt_aes(seed, message): cipher = AESCipher(seed) encrypted = cipher.encrypt(message)