mirror of
https://github.com/BLAKE3-team/BLAKE3
synced 2024-05-09 15:56:23 +02:00
Compare commits
3 Commits
d650d38cab
...
28b6e88e59
Author | SHA1 | Date | |
---|---|---|---|
Pavel(Pavlo) Mazniker | 28b6e88e59 | ||
Javier Blazquez | 0816badf3a | ||
P.M | bf42932833 |
|
@ -4,9 +4,12 @@
|
|||
|
||||
#include "blake3_impl.h"
|
||||
|
||||
#if defined(IS_X86)
|
||||
#if defined(_MSC_VER)
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
#if defined(IS_X86)
|
||||
#if defined(_MSC_VER)
|
||||
#include <intrin.h>
|
||||
#elif defined(__GNUC__)
|
||||
#include <immintrin.h>
|
||||
|
|
|
@ -28,7 +28,7 @@ enum blake3_flags {
|
|||
#define INLINE static inline __attribute__((always_inline))
|
||||
#endif
|
||||
|
||||
#if defined(__x86_64__) || defined(_M_X64)
|
||||
#if (defined(__x86_64__) || defined(_M_X64)) && !defined(_M_ARM64EC)
|
||||
#define IS_X86
|
||||
#define IS_X86_64
|
||||
#endif
|
||||
|
@ -38,7 +38,7 @@ enum blake3_flags {
|
|||
#define IS_X86_32
|
||||
#endif
|
||||
|
||||
#if defined(__aarch64__) || defined(_M_ARM64)
|
||||
#if defined(__aarch64__) || defined(_M_ARM64) || defined(_M_ARM64EC)
|
||||
#define IS_AARCH64
|
||||
#endif
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@
|
|||
#[cfg(test)]
|
||||
mod test;
|
||||
|
||||
// The guts module is for incremental use cases like the `bao` crate that need
|
||||
// The guts module is for incremental use cases like the `bao` crate that needs
|
||||
// to explicitly compute chunk and parent chaining values. It is semi-stable
|
||||
// and likely to keep working, but largely undocumented and not intended for
|
||||
// widespread use.
|
||||
|
@ -223,7 +223,7 @@ pub struct Hash([u8; OUT_LEN]);
|
|||
|
||||
impl Hash {
|
||||
/// The raw bytes of the `Hash`. Note that byte arrays don't provide
|
||||
/// constant-time equality checking, so if you need to compare hashes,
|
||||
/// constant-time equality checking, so if you need to compare hashes,
|
||||
/// prefer the `Hash` type.
|
||||
#[inline]
|
||||
pub const fn as_bytes(&self) -> &[u8; OUT_LEN] {
|
||||
|
|
Loading…
Reference in New Issue