Files
android_bootable_recovery/twrpDigest/Android.mk
bigbiff bigbiff 56cf564658 twrpDigest refactor
This patch is to refactor twrpDigest using polymorphism
and inheritance to use the same call patterns for creating and
reading a digest. Now a library.
Use SHA2 from libcrypto. SHA2 is default if device has libcrypto.

Change string MD5 everywhere to use digest or Digest instead. Updated
string tags to digest. Translation will be required.

Switch out digest code into a driver class from partitionmanager.

SHA2 is better for digest creation due to decreased collision space
compared to MD5 and SHA1.

See https://en.wikipedia.org/wiki/SHA-2

Change-Id: I74b5546789990b12aa4ce2e389d25f80a3fe213f
2017-06-17 07:05:45 -05:00

30 lines
707 B
Makefile

LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libtwrpdigest
LOCAL_MODULE_TAGS := optional
LOCAL_CFLAGS = -fno-strict-aliasing
LOCAL_C_INCLUDES := external/openssl/include bionic
LOCAL_SRC_FILES = \
twrpDigest.cpp \
twrpMD5.cpp \
digest/md5/md5.c
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
LOCAL_C_INCLUDES += external/stlport/stlport
endif
LOCAL_SHARED_LIBRARIES += libc libstdc++
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
LOCAL_SHARED_LIBRARIES += libstlport
else
LOCAL_SHARED_LIBRARIES += libc++ libcrypto
LOCAL_SRC_FILES += \
twrpSHA.cpp
endif
include $(BUILD_SHARED_LIBRARY)