/decrypt

메시지를 복호화합니다.

엔드포인트
POST /decrypt
Content-Type
application/json

요청

본문

JSON

{
"enc": [ENCRYPTION_TYPE],
"b64_ciphertext": "[BASE64_ENCODED_CIPHERTEXT]",
"user_id": [USER_ID]
}
enc int

암호화 유형입니다. 데이터베이스에서 가져온 정수입니다.

b64_ciphertext string

Base64 인코딩된 암호화 메시지입니다.

user_id long 선택적

사용자 ID입니다.

기본값
config.jsonbot_id

예제

Shell

curl -d '{"enc": 0, "b64_ciphertext": "[ENCRYPTED_MESSAGE_BASE64]", "user_id": 1234567890}' \
-H "Content-Type: application/json" \
-X POST http://[YOUR_DEVICE_IP]:[bot_http_port]/decrypt

응답

JSON

{
  "plain_text": "[DECRYPTED_MESSAGE_TEXT]"
}
plain_text string

복호화된 평문입니다.