/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2016 - 2019 Samsung Electronics Co., Ltd All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
_initialize();
- WAE_SLOGI("Encryption Started. size=%d", data->size);
+ WAE_SLOGI("Encryption Started. size=%zu", data->size);
/* check input paramter */
if (ce->dek->size != 32) {
- WAE_SLOGE("Encryption Failed. Invalid Key Length. key_len=%d", ce->dek->size);
+ WAE_SLOGE("Encryption Failed. Invalid Key Length. key_len=%zu", ce->dek->size);
return WAE_ERROR_INVALID_PARAMETER;
}
*pencrypted_data = encrypted_data;
- WAE_SLOGI("Encryption Ended Successfully. encrypted_len: %d", encrypted_data->size);
+ WAE_SLOGI("Encryption Ended Successfully. encrypted_len: %zu", encrypted_data->size);
error:
if (ctx != NULL)
_initialize();
- WAE_SLOGI("Decryption Started. size=%d", encrypted_data->size);
+ WAE_SLOGI("Decryption Started. size=%zu", encrypted_data->size);
/* check input paramter */
if (ce->dek->size != 32) {
- WAE_SLOGE("Decryption Failed. Invalid Key Length. key_len=%d", ce->dek->size);
+ WAE_SLOGE("Decryption Failed. Invalid Key Length. key_len=%zu", ce->dek->size);
return WAE_ERROR_INVALID_PARAMETER;
}
*pdata = data;
- WAE_SLOGI("Decryption Ended Successfully. decrypted_len: %d", data->size);
+ WAE_SLOGI("Decryption Ended Successfully. decrypted_len: %zu", data->size);
error:
if (ctx != NULL)
/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2016 - 2019 Samsung Electronics Co., Ltd All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*pduk = duk;
- WAE_SLOGD("get old duk of length: %d", duk->size);
+ WAE_SLOGD("get old duk of length: %zu", duk->size);
return WAE_ERROR_NONE;
}
iv->size = _size;
*piv = iv;
- WAE_SLOGD("get old iv of length: %d", iv->size);
+ WAE_SLOGD("get old iv of length: %zu", iv->size);
return WAE_ERROR_NONE;
}
/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2016 - 2019 Samsung Electronics Co., Ltd All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
size_t total_len = sizeof(size_t) * 3 + ce->dek->size + ce->iv->size + sizeof(bool);
- WAE_SLOGD("(serialization) total(%d) dek(%d) iv(%d) is_migrated(%d)",
+ WAE_SLOGD("(serialization) total(%zu) dek(%zu) iv(%zu) is_migrated(%d)",
total_len, ce->dek->size, ce->iv->size, ce->is_migrated_app);
unsigned char *_buf = (unsigned char *)malloc(total_len);
pos += sizeof(bool);
if (total_len != pos) {
- WAE_SLOGE("(serialization) total len(%d) and actualy written byte(%d) "
+ WAE_SLOGE("(serialization) total len(%zu) and actualy written byte(%zu) "
"isn't matched!", total_len, pos);
ckmc_buffer_free(buf);
return WAE_ERROR_UNKNOWN;
pos += sizeof(size_t);
if (buf->size != total_len) {
- WAE_SLOGE("(deserialization) total len(%d) and actualy written byte(%d) "
+ WAE_SLOGE("(deserialization) total len(%zu) and actualy written byte(%zu) "
"isn't matched!", total_len, buf->size);
return WAE_ERROR_UNKNOWN;
}
memcpy(&is_migrated_app, buf->data + pos, sizeof(bool));
pos += sizeof(bool);
- WAE_SLOGD("(deserialization) total(%d) dek(%d) iv(%d) is_migrated(%d)",
+ WAE_SLOGD("(deserialization) total(%zu) dek(%zu) iv(%zu) is_migrated(%d)",
total_len, dek_size, iv_size, is_migrated_app);
if (pos != buf->size) {