History log of /external/selinux/libselinux/src/sha1.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
502b48f4db8d753de5e0fe3e4592ea4fb1f872d1 17-Oct-2016 William Roberts <william.c.roberts@intel.com> libselinux: fix required alignment for sha1.c on mac

When building on mac with ANDROID_HOST=y, clang complains:
sha1.c:73:33: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'CHAR64LONG16 *' increases required alignment from 1 to 4 [-Werror,-Wcast-align]
CHAR64LONG16* block = (CHAR64LONG16*) workspace;

Rather then casting the bytearray to the CHAR64LONG16 union,
just create a stack workspace of type CHAR64LONG16.

This will prevent alignment issues with the data accesses.

Signed-off-by: William Roberts <william.c.roberts@intel.com>
/external/selinux/libselinux/src/sha1.c
c1db824828d45eb475220c26226b1cc58cd77f23 22-Oct-2015 Richard Haines <richard_c_haines@btinternet.com> libselinux: Replace selabel_digest hash function

This replaces the openssl library with SHA1 hash functions
extracted from [1] as this is a public domain implementation.

util/selabel_digest -v option still compares the result with
the openssl command "openssl dgst -sha1 -hex .." for validation.

[1] https://github.com/WaterJuice/CryptLib

Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
/external/selinux/libselinux/src/sha1.c