mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Attempt #2: Update gyb to latest version and use python3
This commit is contained in:
committed by
Maurice Parker
parent
5f5fc2ad4f
commit
54623ec421
@@ -8,14 +8,14 @@ def chunks(seq, size):
|
||||
return (seq[i:(i + size)] for i in range(0, len(seq), size))
|
||||
|
||||
def encode(string, salt):
|
||||
bytes = string.encode("UTF-8")
|
||||
return [ord(bytes[i]) ^ salt[i % len(salt)] for i in range(0, len(bytes))]
|
||||
bytes_ = string.encode("UTF-8")
|
||||
return [bytes_[i] ^ salt[i % len(salt)] for i in range(0, len(bytes_))]
|
||||
|
||||
def snake_to_camel(snake_str):
|
||||
components = snake_str.split('_')
|
||||
return components[0].lower() + ''.join(x.title() for x in components[1:])
|
||||
|
||||
salt = [ord(byte) for byte in os.urandom(64)]
|
||||
salt = [byte for byte in os.urandom(64)]
|
||||
}%
|
||||
import Secrets
|
||||
|
||||
|
||||
Reference in New Issue
Block a user