Skip to content

Commit 4127681

Browse files
author
liuhuiqi.7
committed
feat(ark e2e): fix typo
Change-Id: If8d2f7df8a9dd50cd10c037acd4c0592482299df
1 parent 54efaad commit 4127681

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

volcenginesdkarkruntime/_utils/_key_aggrement.py renamed to volcenginesdkarkruntime/_utils/_key_agreement.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,13 @@ def encrypt_string(self, plaintext: str) -> tuple[bytes, bytes, str, str]:
8686
ciphertext = aes_gcm_encrypt_base64_string(key, nonce, plaintext)
8787
return key, nonce, token, ciphertext
8888

89+
def encrypt_string_with_key(self, key: bytes, nonce: bytes, plaintext: str) -> str:
90+
"""encrypt_string encrypt plaintext with ECIES DH protocol
91+
"""
92+
# Encrypt message using AES-GCM
93+
ciphertext = aes_gcm_encrypt_base64_string(key, nonce, plaintext)
94+
return ciphertext
95+
8996
def generate_ecies_key_pair(self) -> tuple[bytes, bytes, str]:
9097
"""generate_ecies_key_pair generate ECIES key pair
9198
"""

0 commit comments

Comments
 (0)