-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #636 from IABTechLab/tjm-UID2-3194-azure-env-varia…
…bles Prevent the addition of environment variables for Azure
- Loading branch information
Showing
3 changed files
with
32 additions
and
6 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
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,20 @@ | ||
import sys | ||
from hashlib import sha256 | ||
|
||
def str_to_sha256(x: str) -> str: | ||
return sha256(x.encode('utf-8')).hexdigest() | ||
|
||
def print_data_sha256(data: str) -> str: | ||
print(str_to_sha256(data)) | ||
|
||
def print_data_sha256_stripped(data: str) -> str: | ||
print(str_to_sha256(data.strip())) | ||
|
||
def main(): | ||
with open(sys.argv[1], 'r') as file: | ||
data = file.read() | ||
|
||
print_data_sha256(data) | ||
|
||
if __name__ == '__main__': | ||
main() |