#include <stdio.h>
static int sample_setup() {
return 1;
}
return 0;
}
static int sample_issacweb_symmetric_encryption_string() {
const unsigned char plaintext[] = {
0x80, 0x70, 0x60, 0x50, 0x40, 0x30, 0x20, 0x10,
0x00, 0xF0, 0xE0, 0xD0, 0xC0, 0xB0, 0xA0, 0x90
};
unsigned char secretKey[] = {
0x7B, 0xAA, 0x7D, 0x69, 0xAC, 0xE6, 0x52, 0xA0,
0xD2, 0x1C, 0x16, 0x92, 0xAD, 0x91, 0x04, 0x1E
};
char encryptedB64[256] = { 0, };
int encryptedLen = 0;
char decrypted[256] = { 0, };
int decryptedLen = 0;
printf("sample_issacweb_symmetric_encryption_string() => ");
if (encryptedLen <= 0) {
return 1;
}
if (decryptedLen <= 0) {
return 1;
}
printf("[OK]\n");
return 0;
}
int main() {
int result;
result = sample_setup();
if (result != 0) {
return result;
}
return sample_issacweb_symmetric_encryption_string();
}
EErrorCode
새롭게 구현된 내부 API 에서 사용되는 에러코드들
Definition: wasdk_errorcode.h:13
@ EEC_Success
성공
Definition: wasdk_errorcode.h:14
WA_SDK_API int FUNCCALL issacweb_decrypt_ex_s(void *outbuf, char *inputB64, void *key, int cipher_id)
암호문(Base64)을 복호화한다.
WA_SDK_API int FUNCCALL issacweb_encrypt_ex_s(char *outstring, void *input, int input_len, void *key, int cipher_id)
평문을 암호화 후 Base64로 인코딩한다.
@ ISSACWEB_SEED
SEED
Definition: issacweb.h:53
WA_SDK_API const char *FUNCCALL wasdk_error_message(EErrorCode errorCode)
에러코드에 해당하는 에러 메시지를 가져온다.
WA_SDK_API EErrorCode FUNCCALL wasdk_init(void)
모듈 초기화를 실행한다.
EXTERNC const char * errorcode_to_string(int code)