summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsangwan.kwon <sangwan.kwon@samsung.com>2017-09-14 07:29:21 -0400
committersangwan.kwon <sangwan.kwon@samsung.com>2017-09-14 07:32:19 -0400
commitbb7d0dd6c3c2a902ae544f78f1cc6952723a1a19 (patch)
tree3db16c575fa463b469db1dd483aa53162ced14f3
parent206851a1dda5282b75b92eb4ae13c298b6859ae2 (diff)
downloadlibcryptsvc-tizen_4.0.tar.gz
libcryptsvc-tizen_4.0.tar.bz2
libcryptsvc-tizen_4.0.zip
Change-Id: If7b368edbcc382587de28fdef13aabb184a2d076 Signed-off-by: sangwan.kwon <sangwan.kwon@samsung.com>
-rw-r--r--include/SecCryptoSvc.h2
-rw-r--r--srcs/SecCryptoSvc.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/SecCryptoSvc.h b/include/SecCryptoSvc.h
index 4d5e572..00d3c04 100644
--- a/include/SecCryptoSvc.h
+++ b/include/SecCryptoSvc.h
@@ -90,7 +90,7 @@ typedef enum
//#define SHA1_DIGEST_VALUE_LEN 20
#define SHA256_DIGEST_VALUE_LEN 32
//#define KDF_KEYLEN 16
-#define HASH_LEN 20
+#define HASH_LEN SHA256_DIGEST_VALUE_LEN
//#define SEC_KEYMGR_FEK_SIZE 16
#define CS_ERROR_NONE 0
diff --git a/srcs/SecCryptoSvc.c b/srcs/SecCryptoSvc.c
index da23ed1..c839efe 100644
--- a/srcs/SecCryptoSvc.c
+++ b/srcs/SecCryptoSvc.c
@@ -138,7 +138,7 @@ bool SecFrameGeneratePlatformUniqueKey(unsigned int uLen, unsigned char *pCek)
remain = uLen;
for (i = 0; i < uLen; i += HASH_LEN) {
- result = SHA1(Key, nTempLen, hashedValue);
+ result = SHA256(Key, nTempLen, hashedValue);
nHashLen = HASH_LEN;
if (!result) {