add actions db model and caching V0 (#980)
This commit is contained in:
8
skyvern/forge/sdk/api/crypto.py
Normal file
8
skyvern/forge/sdk/api/crypto.py
Normal file
@@ -0,0 +1,8 @@
|
||||
import hashlib
|
||||
|
||||
|
||||
def calculate_sha256(data: str) -> str:
|
||||
"""Helper function to calculate SHA256 hash of a string."""
|
||||
sha256_hash = hashlib.sha256()
|
||||
sha256_hash.update(data.encode())
|
||||
return sha256_hash.hexdigest()
|
||||
@@ -113,7 +113,7 @@ def rename_file(file_path: str, new_file_name: str) -> str:
|
||||
return file_path
|
||||
|
||||
|
||||
def calculate_sha256(file_path: str) -> str:
|
||||
def calculate_sha256_for_file(file_path: str) -> str:
|
||||
"""Helper function to calculate SHA256 hash of a file."""
|
||||
sha256_hash = hashlib.sha256()
|
||||
with open(file_path, "rb") as f:
|
||||
|
||||
Reference in New Issue
Block a user