mirror of
https://github.com/tcsenpai/hmacrypt.git
synced 2025-06-06 02:45:21 +00:00
proper credits
This commit is contained in:
parent
1e6baf57f6
commit
b097342a82
@ -3,6 +3,7 @@ import hashlib
|
|||||||
from Crypto import Random
|
from Crypto import Random
|
||||||
from Crypto.Cipher import AES
|
from Crypto.Cipher import AES
|
||||||
|
|
||||||
|
# LINK Implementation of seedable AES encryption thanks to: https://stackoverflow.com/a/21928790
|
||||||
class AESCipher(object):
|
class AESCipher(object):
|
||||||
|
|
||||||
def __init__(self, key):
|
def __init__(self, key):
|
||||||
@ -28,7 +29,8 @@ class AESCipher(object):
|
|||||||
def _unpad(s):
|
def _unpad(s):
|
||||||
return s[:-ord(s[len(s)-1:])]
|
return s[:-ord(s[len(s)-1:])]
|
||||||
|
|
||||||
# Implementable methods
|
|
||||||
|
# SECTION implementable methods
|
||||||
# NOTE The cipher is initialized on the fly, so the seed is not stored
|
# NOTE The cipher is initialized on the fly, so the seed is not stored
|
||||||
|
|
||||||
def self_encrypt_aes(seed, message):
|
def self_encrypt_aes(seed, message):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user