VaultCrypto
@Component public class VaultCrypto
源码Source
io/agentscope/builder/web/managed/service/VaultCrypto.java:35–138Vault Crypto,承载智能体的部署、调度与服务化运行。位于 io.agentscope.builder.web.managed.service 包。核心成员包括 encrypt、decrypt、VaultCrypto。
AES-GCM encryption for vault credential payloads.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public VaultCrypto(Environment environment, String configuredKey) | 初始化 `VaultCrypto` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public String encrypt(String plaintext) | 设置该参数。 Encrypts plaintext and returns Base64(iv || ciphertext || tag). |
public String decrypt(String encoded) | 设置该参数。 Decrypts a Base64(iv || ciphertext || tag) payload. |
构造器详情Constructor Detail
VaultCrypto
public VaultCrypto(Environment environment, String configuredKey)
初始化 VaultCrypto 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
environment | Environment | 环境(类型 `Environment`)。The environment. |
configuredKey | String | configured 键(类型 `String`)。The configured key. |
源码Source
io/agentscope/builder/web/managed/service/VaultCrypto.java:45–48方法详情Method Detail
encrypt
public String encrypt(String plaintext)
设置该参数。
Encrypts plaintext and returns Base64(iv || ciphertext || tag).
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
plaintext | String | plaintext(类型 `String`)。The plaintext. |
String返回字符串结果。Returns a string.
源码Source
io/agentscope/builder/web/managed/service/VaultCrypto.java:51–69decrypt
public String decrypt(String encoded)
设置该参数。
Decrypts a Base64(iv || ciphertext || tag) payload.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
encoded | String | 已编码(类型 `String`)。The encoded. |
String返回字符串结果。Returns a string.
源码Source
io/agentscope/builder/web/managed/service/VaultCrypto.java:72–92