ByteBuffer pBuf;
pBuf.Construct(pBufSize);
const byte *pByte = reinterpret_cast<const byte*>(plainBuffer);
- pBuf.SetArray(pByte, 0, pBufSize);
+ if (pBuf.SetArray(pByte, 0, pBufSize) != E_SUCCESS) {
+ LogDebug("Couldnot set pBuf");
+ return NULL;
+ }
pBuf.Flip();
- ByteBuffer* getBuffer = pInstance->_TrustZoneService::EncryptN(*appInfo, pBuf);
- return getBuffer;
+ return pInstance->_TrustZoneService::EncryptN(*appInfo, pBuf);
}
Tizen::Base::ByteBuffer* TEST_dec(
ByteBuffer pBuf;
pBuf.Construct(pBufSize);
const byte *pByte = reinterpret_cast<const byte*>(plainBuffer);
- pBuf.SetArray(pByte, 0, pBufSize);
+ if (pBuf.SetArray(pByte, 0, pBufSize) != E_SUCCESS) {
+ LogDebug("Couldnot set pBuf");
+ return NULL;
+ }
pBuf.Flip();
- ByteBuffer* getBufferTEST =
- pInstance->_TrustZoneService::DecryptN(*appInfo, pBuf);
- return getBufferTEST;
+ return pInstance->_TrustZoneService::DecryptN(*appInfo, pBuf);
}
}
pkgid.c_str());
ByteBuffer appInfo;
appInfo.Construct(pkgid.length());
- appInfo.SetArray(b_pkgid, 0, pkgid.length());
+
+ if (appInfo.SetArray(b_pkgid, 0, pkgid.length()) != E_SUCCESS) {
+ LogDebug("Couldnot set appInfo");
+ return;
+ }
+
appInfo.Flip();
do