-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
82f8b6d
commit 14f81f1
Showing
3 changed files
with
25 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
from .throw import throw | ||
from .checksum import md5, sha1, sha256, sha512 | ||
from .deepformat import deepformat | ||
from .lookup import variable, output, resource | ||
from .throw import throw | ||
|
||
|
||
__all__ = [ | ||
throw, | ||
md5, | ||
sha1, | ||
sha256, | ||
sha512, | ||
deepformat, | ||
variable, | ||
output, | ||
resource, | ||
throw, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import hashlib | ||
|
||
|
||
def md5(ctx, string): | ||
return hashlib.md5(string.encode()).hexdigest() | ||
|
||
|
||
def sha1(ctx, string): | ||
return hashlib.sha1(string.encode()).hexdigest() | ||
|
||
|
||
def sha256(ctx, string): | ||
return hashlib.sha256(string.encode()).hexdigest() | ||
|
||
|
||
def sha512(ctx, string): | ||
return hashlib.sha512(string.encode()).hexdigest() |