Skip to content

Commit

Permalink
Improve comments, fix dates, add header
Browse files Browse the repository at this point in the history
  • Loading branch information
gperciva committed Jan 29, 2025
1 parent ff5bd47 commit a81e82c
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 2 deletions.
4 changes: 2 additions & 2 deletions COPYRIGHT
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
The included code and documentation ("scrypt") is distributed under the
following terms:

Copyright 2005-2023 Colin Percival. All rights reserved.
Copyright 2011-2023 Tarsnap Backup Inc. All rights reserved.
Copyright 2005-2025 Colin Percival. All rights reserved.
Copyright 2011-2025 Tarsnap Backup Inc. All rights reserved.
Copyright 2014 Sean Kelly. All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
4 changes: 4 additions & 0 deletions libcperciva/cpusupport/Build/cpusupport-ARM-AES.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include <stdint.h>

#ifdef __ARM_NEON
#include <arm_neon.h>
#endif
Expand All @@ -11,10 +13,12 @@ main(void)
uint32x4_t lanes = {0};
uint8_t arr[16] = {0};

/* Check AES. */
data = vld1q_u8(arr);
output = vaeseq_u8(data, key);
(void)output; /* UNUSED */

/* Check _u32: some compilers only support the _u8 variant. */
lanes = vdupq_laneq_u32(lanes, 0);

/* Success! */
Expand Down
2 changes: 2 additions & 0 deletions libcperciva/cpusupport/cpusupport_x86_aesni.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,7 @@ CPUSUPPORT_FEATURE_DECL(x86, aesni)

unsupported:
#endif

/* Not supported. */
return (0);
}
2 changes: 2 additions & 0 deletions libcperciva/cpusupport/cpusupport_x86_rdrand.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,7 @@ CPUSUPPORT_FEATURE_DECL(x86, rdrand)

unsupported:
#endif

/* Not supported. */
return (0);
}
2 changes: 2 additions & 0 deletions libcperciva/cpusupport/cpusupport_x86_shani.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,7 @@ CPUSUPPORT_FEATURE_DECL(x86, shani)

unsupported:
#endif

/* Not supported. */
return (0);
}
2 changes: 2 additions & 0 deletions libcperciva/cpusupport/cpusupport_x86_sse2.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,7 @@ CPUSUPPORT_FEATURE_DECL(x86, sse2)

unsupported:
#endif

/* Not supported. */
return (0);
}
2 changes: 2 additions & 0 deletions libcperciva/cpusupport/cpusupport_x86_ssse3.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,7 @@ CPUSUPPORT_FEATURE_DECL(x86, ssse3)

unsupported:
#endif

/* Not supported. */
return (0);
}
2 changes: 2 additions & 0 deletions libcperciva/util/align_ptr.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ align_ptr(uint8_t * arr, size_t alignment)
*/
offset = (uintptr_t)(&arr[0]) % alignment;
offset = (alignment - offset) % alignment;

/* Return the aligned pointer. */
return ((void *)&arr[offset]);
}

Expand Down

0 comments on commit a81e82c

Please sign in to comment.