mirror of
https://github.com/LouisShark/chatgpt_system_prompt.git
synced 2025-07-08 15:50:36 -04:00
Create David
This commit is contained in:
parent
2b50ee6daf
commit
81146e662e
14 changed files with 3913 additions and 0 deletions
21
prompts/gpts/knowledge/David/verify_seed_string.py
Normal file
21
prompts/gpts/knowledge/David/verify_seed_string.py
Normal file
|
@ -0,0 +1,21 @@
|
|||
import hashlib
|
||||
|
||||
|
||||
def verify_seed_string(seed_string, hardcoded_hash):
|
||||
"""
|
||||
Verify the provided seed string against the hardcoded hash.
|
||||
|
||||
Args:
|
||||
seed_string (str): The seed string provided by the user.
|
||||
hardcoded_hash (str): The hardcoded hash stored in the settings.
|
||||
|
||||
Returns:
|
||||
bool: True if the hash of the seed string matches the hardcoded hash, False otherwise.
|
||||
"""
|
||||
# Generate the hash from the seed string
|
||||
generated_hash = hashlib.sha256(seed_string.encode()).hexdigest()
|
||||
|
||||
# Compare the generated hash with the hardcoded hash
|
||||
return generated_hash == hardcoded_hash
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue