2017-04-19 22:58:20 +00:00
|
|
|
#ifndef ZT_SALSA2012_ARM32NEON_ASM
|
|
|
|
#define ZT_SALSA2012_ARM32NEON_ASM
|
|
|
|
|
2017-04-19 23:49:26 +00:00
|
|
|
#if defined(__linux__) || defined(linux) || defined(__LINUX__) || defined(__linux)
|
|
|
|
#include <sys/auxv.h>
|
|
|
|
#include <asm/hwcap.h>
|
2017-04-20 00:11:56 +00:00
|
|
|
#define zt_arm_has_neon() ((getauxval(AT_HWCAP) & HWCAP_NEON) != 0)
|
2018-09-13 02:51:28 +00:00
|
|
|
#elif defined(__ARM_NEON__) || defined(__ARM_NEON)
|
2017-04-19 23:49:26 +00:00
|
|
|
#define zt_arm_has_neon() (true)
|
2018-09-13 02:51:28 +00:00
|
|
|
#else
|
|
|
|
#define zt_arm_has_neon() (false)
|
2017-04-19 23:49:26 +00:00
|
|
|
#endif
|
|
|
|
|
2017-04-19 22:58:20 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// ciphertext buffer, message/NULL, length, nonce (8 bytes), key (32 bytes)
|
|
|
|
extern int zt_salsa2012_armneon3_xor(unsigned char *c,const unsigned char *m,unsigned long long len,const unsigned char *n,const unsigned char *k);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|