mirror of
https://github.com/gryf/ebook-converter.git
synced 2026-01-17 17:54:11 +01:00
Removed unsued functions
This commit is contained in:
@@ -2,24 +2,12 @@ from base64 import standard_b64decode, standard_b64encode
|
||||
from binascii import hexlify, unhexlify
|
||||
|
||||
|
||||
def as_base64_bytes(x, enc='utf-8'):
|
||||
if isinstance(x, str):
|
||||
x = x.encode(enc)
|
||||
return standard_b64encode(x)
|
||||
|
||||
|
||||
def as_base64_unicode(x, enc='utf-8'):
|
||||
if isinstance(x, str):
|
||||
x = x.encode(enc)
|
||||
return standard_b64encode(x).decode('ascii')
|
||||
|
||||
|
||||
def from_base64_unicode(x, enc='utf-8'):
|
||||
if isinstance(x, str):
|
||||
x = x.encode('ascii')
|
||||
return standard_b64decode(x).decode(enc)
|
||||
|
||||
|
||||
def from_base64_bytes(x):
|
||||
if isinstance(x, str):
|
||||
x = x.encode('ascii')
|
||||
@@ -32,18 +20,6 @@ def as_hex_bytes(x, enc='utf-8'):
|
||||
return hexlify(x)
|
||||
|
||||
|
||||
def as_hex_unicode(x, enc='utf-8'):
|
||||
if isinstance(x, str):
|
||||
x = x.encode(enc)
|
||||
return hexlify(x).decode('ascii')
|
||||
|
||||
|
||||
def from_hex_unicode(x, enc='utf-8'):
|
||||
if isinstance(x, str):
|
||||
x = x.encode('ascii')
|
||||
return unhexlify(x).decode(enc)
|
||||
|
||||
|
||||
def from_hex_bytes(x):
|
||||
if isinstance(x, str):
|
||||
x = x.encode('ascii')
|
||||
|
||||
Reference in New Issue
Block a user