Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F4461
__init__.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
651 B
Referenced Files
None
Subscribers
None
__init__.py
View Options
from
abc
import
ABC
,
abstractmethod
VERSION
=
1
cache
=
{
}
def
get_handler
(
version
=
None
):
if
not
version
:
version
=
VERSION
if
version
not
in
cache
:
try
:
exec
(
f
'from .v{version} import Handler as Crypto_v{version}'
)
exec
(
f
'cache[{version}] = Crypto_v{version}'
)
except
ModuleNotFoundError
:
cache
[
version
]
=
None
handler
=
cache
[
version
]
if
not
handler
:
raise
ValueError
(
f
'crypto version {version}'
)
return
handler
()
class
Handler
(
ABC
):
def
__init__
(
self
):
pass
@abstractmethod
def
register
(
self
):
raise
NotImplemented
()
File Metadata
Details
Attached
Mime Type
text/x-script.python
Expires
Tue, Sep 15, 9:46 AM (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3667
Default Alt Text
__init__.py (651 B)
Attached To
Mode
rLANK Encrypted Communications
Attached
Detach File
Event Timeline
Log In to Comment