add `enc` for core-rpc.

master
Apex Liu 2018-04-26 08:55:28 +08:00
parent b312472ad4
commit ec07618af0
1 changed files with 29 additions and 0 deletions

@ -110,6 +110,35 @@ TELEPORT CORE服务默认在 127.0.0.1:52080 上监听,其访问格式如下
}
```
### enc
加密一个字符串,常用于加密远程主机账号的密码或私钥。
#### 参数
1. `p` - 被加密的明文p表示plain-text
#### 返回
1. `c` - 加密后密文按base64编码形式给出c表示cipher-text
#### 示例
```json
// Request
{
"p": "my-password"
}
// Result
{
"code": 0,
"data": {
"c": "GHux0lCLMnSYVZYlOloKc86qIwAjfQTQUeev2WpM7Ds="
}
}
```
### status
获取core服务的工作状态和基本信息。