Zack Puhl
ed92476916
Add wyhash2 and metro64/128 modern hashing ( #2293 )
...
* add wyhash2, metro64, and metro128 hashes; best performing non-crypto hash functions
* add superfast 64-bit a5hash; not streamed, no 128-bit impl
* add komihash and associated tests/benchmarks
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2025-07-20 00:06:10 +02:00
Zack Puhl
b8d07474fe
Add SipHash Family of Keyed PRFs ( #2287 )
...
* implement SipHash family of keyed PRFs
2025-07-18 16:16:47 +02:00
Zack Puhl
70159c00cc
Add WHIRLPOOL hashing to stdlib ( #2273 )
...
* add WHIRLPOOL hashing to stdlib
2025-07-10 16:39:42 +02:00
Christoffer Lerno
13bb2b6690
Const Enums From / to ordinal using casts is back. Add "--use-old-enums", deprecating lookup.
2025-06-30 21:41:52 +02:00
Zack Puhl
0448e50b3d
Fix Incorrect SHA256 Hashes for Large Inputs ( #2247 )
...
* fix >256MiB sha256 bitcount computation overflow
2025-06-28 03:20:33 +02:00
Zack Puhl
5efc721b0c
Add SHA512 Module to stdlib ( #2227 )
...
* add sha512 module to stdlib with passing unit tests
* fix release notes PR ref num for this
* deduplicate const SHA512 hash info
2025-06-20 19:08:45 +02:00
Christoffer Lerno
946c167bf1
Improve error for default args #2096 . Deprecated old inference with slice copy. Copying must now ensure a slicing operator at the end of the right hand side: foo[1..2] = bar[..] rather than the old foo[1..2] = bar. The old behaviour can be mostly retained with --use-old-slice-copy).
2025-04-18 17:19:04 +02:00
Christoffer Lerno
5c77c9a754
- Change distinct -> typedef.
...
- Order of attribute declaration is changed for `alias`.
- Added `LANGUAGE_DEV_VERSION` env constant.
- Rename `anyfault` -> `fault`.
- Changed `fault` -> `faultdef`.
- Added `attrdef` instead of `alias` for attribute aliases.
2025-03-15 20:10:47 +01:00
Christoffer Lerno
8b49e6c14d
Rename def to alias.
2025-03-13 11:22:27 +01:00
Christoffer Lerno
c0b80eccad
Change @return! syntax to require ":" after faults. Update all contracts to consistently use ":" before the description.
2025-03-05 17:11:45 +01:00
Christoffer Lerno
0a905d8458
Change all hash functions to have a common hash function.
2025-03-03 20:07:02 +01:00
Christoffer Lerno
2a895ec7be
First 0.7 update, removing all deprecated features.
2025-03-03 00:32:20 +01:00
Christoffer Lerno
e77d1fb646
- Increase precedence of (Foo) { 1, 2 }
...
- Add `--enable-new-generics` to enable `Foo{int}` generic syntax.
2025-02-18 00:26:22 +01:00
Christoffer Lerno
8c58b31bbd
Remove <[]> experimental generic syntax.
2025-02-13 12:53:46 +01:00
Christoffer Lerno
79a4b6855b
- Detect unaligned loads #1951 .
...
- Fix issue where aligned bitstructs did not store/load with the given alignment.
2025-02-10 22:07:15 +01:00
Christoffer Lerno
9530fe8fcd
Fix regression for parsing types and switch to the "new" generic syntax that's being tested.
2025-01-26 22:51:27 +01:00
Christoffer Lerno
d4bd68c188
Fix bug in SHA1 for longer blocks #1854 .
2025-01-17 01:10:40 +01:00
Christoffer Lerno
8e0d6d11b9
Deprecated '&' macro arguments.
2025-01-08 22:13:49 +01:00
Christoffer Lerno
dad97fc2d9
Improved #foo resolution inside of the compiler.
...
Deprecation of several `&` macros.
2025-01-08 12:55:20 +01:00
konimarti
e67e9d3bbf
Fix fnv a hashes ( #1667 )
...
* fix fnv32a
* fix fnv64a
* Simplify code
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2024-12-07 15:39:45 +01:00
Christoffer Lerno
31cd839063
Switch to <* *> docs. Fix issue with dynamically loaded C3 libs with other C3 code.
2024-10-14 02:14:34 +02:00
Christoffer Lerno
a665978b64
Fixing some whitespace issues.
2024-10-08 19:38:31 +02:00
Fernando López Guevara
131a783e89
feat(hash): added test for sha256
2024-10-02 16:55:17 +02:00
Christoffer Lerno
c8018c5543
Added generic PBKDF2 implementation.
2024-09-30 00:07:49 +02:00
Christoffer Lerno
3b009e0b50
Added generic HMAC.
2024-09-28 23:28:11 +02:00
Christoffer Lerno
cc130e04dd
Added MD5 and crypto::safe_compare.
2024-09-28 22:16:25 +02:00
Christoffer Lerno
99cfaa1583
Refactor protocols.
2023-10-06 22:31:41 +02:00
Christoffer Lerno
499c82b089
Updated indentation to C3 standard.
2023-07-26 14:01:24 +02:00
Christoffer Lerno
34306cbf5d
Fixes missing checks to body arguments. Do not create debug declaration for value-only parameter. Bug in alignment for atomics. Macro ref parameters are pointers.
2023-07-15 15:11:44 +02:00
Pierre Curto
731729cf1b
std/lib/hash: rename receiver to self
...
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-07-04 21:07:20 +02:00
Pierre Curto
f8a3e4f6f0
add basic quicksort support ( #816 )
...
* lib/std/sort: refactor binarysearch namespace to prepare for sorting
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
* std/lib/sort: add basic quicksort support
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
* lib/std/hash: use method first parameter inferred type
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
* lib/std/hash: add fnv64a support
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
---------
Signed-off-by: Pierre Curto <pierre.curto@gmail.com >
2023-07-04 20:15:03 +02:00
Christoffer Lerno
c249c3f3b6
Fix of accidentally printing "prev" when using $checks. Updated binary search.
2023-07-04 02:29:02 +02:00
Christoffer Lerno
50784d4df6
Updated to use the new implicit type for method calls in some libraries. Made the grammar a little more liberal.
2023-07-02 10:55:25 +02:00
Christoffer Lerno
4c1edfb941
Dev ( #777 )
...
* The new @if directive.
2023-06-10 23:16:28 +02:00
Christoffer Lerno
ddd0497922
Better lowering of distinct types. Noreturn function call expr recognized as a "jump" for escape analysis. Preferring "def" in libs. To upper / to lower for ascii. Initial dynlib support.
2023-05-21 21:41:01 +02:00
Christoffer Lerno
172d561f07
Change syntax of $if, $assert, $include, $echo. Introduces $error
2023-05-06 12:18:00 +02:00
Christoffer Lerno
5ee0d52ff1
Deprecate :; in $if etc.
2023-03-20 01:03:54 +01:00
Christoffer Lerno
2f255ac5c3
Sha1.
2023-02-24 10:49:01 +01:00
Christoffer Lerno
df77b692d6
Support "typedef"
2023-02-14 16:49:27 +01:00
Christoffer Lerno
5e457be605
Implement more @export / @private improvements. Make @private default… ( #729 )
2023-02-13 08:31:40 +01:00
Christoffer Lerno
db06f99445
"[]=" now works as overload. Improved eval resolution. Added $$FUNCPTR
2022-10-05 22:58:28 +02:00
Christoffer Lerno
d42193dbd6
Fixes the alloca alignment on x64 for alignment > 16. Improved indexing into ConstInitializer adding const indexing into a const array during compile time. Add a temporary enum values result.
2022-02-08 11:41:34 +01:00