MCPcopy Index your code
hub / github.com/RNCryptor/RNCryptor-python / to_bytes

Function to_bytes

rncryptor.py:20–24  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

18
19if PY2:
20 def to_bytes(s):
21 if isinstance(s, str):
22 return s
23 if isinstance(s, unicode):
24 return s.encode('utf-8')
25
26 to_str = to_bytes
27

Callers 4

pre_decrypt_dataMethod · 0.85
decryptMethod · 0.85
pre_encrypt_dataMethod · 0.85
encryptMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected