Commit Graph

9777 Commits

Author SHA1 Message Date
gingerBill
79173ef119 Merge pull request #3136 from Yawning/feature/crypto-hash
core:crypto/hash - Add and refactor
2024-02-06 17:40:45 +00:00
Yawning Angel
44758f2a60 core/crypto: Stop using context.temp_allocator
The max digest size for the foreseeable future will be 512 bits, and the
max block size is currently 1152 bits (SHA3-224).  If people add more
exotic hash algorithms without bumping the constants when required,
tests will fail.

The stream buffer will currently be 576 bytes, which is "fine" to just
stick on the stack, and is a sensible multiple of the more common block
size of 64 bytes.
2024-02-07 02:33:53 +09:00
gingerBill
1f0b24b735 Remove unneeded casts 2024-02-06 17:22:13 +00:00
gingerBill
327853ab92 Merge branch 'master' of https://github.com/odin-lang/Odin 2024-02-06 17:20:13 +00:00
gingerBill
a6878fcd91 Clean up code for initialize_symbols 2024-02-06 17:20:07 +00:00
gingerBill
61202b5abd Merge pull request #3174 from thetarnav/webgl2-matrix-flatten-2
Use `intrinsics.matrix_flatten` in `webgl2.odin`
2024-02-06 17:00:33 +00:00
Yawning Angel
56516ee8b2 core/crypto/poly1305: Relax the tag length check on the verify helper 2024-02-07 00:42:01 +09:00
Yawning Angel
1cc639bc93 core/crypto/hmac: Initial import 2024-02-07 00:42:01 +09:00
Yawning Angel
2357293e05 core/crypto/hash: Make the low level interface allocator-less
Just (ab)using reflect to victory is probably fine.
2024-02-07 00:37:18 +09:00
Yawning Angel
7a8b1669b0 core/crypto: Expose the block sizes for every hash algorithm
While I just went and made this private, this information is required
for keying HMAC.
2024-02-07 00:37:18 +09:00
Yawning Angel
bc160d2eb7 tests/core/crypto: Reorganize
All of our crypto is modern now unless exiled to the legacy sub-package,
so move the test cases for the currently un-unified algorithms into the
main test driver file, and rename the benchmark driver to reflect
reality.
2024-02-07 00:37:18 +09:00
Yawning Angel
b02b85d242 core/crypto/shake: SHAKE is an XOF, not a hash 2024-02-07 00:37:18 +09:00
Yawning Angel
1d151c4c92 tests/core/crypto: Cleanup/modernize a bit 2024-02-07 00:37:18 +09:00
Yawning Angel
899fab64d9 core/crypto: Documentation cleanups 2024-02-07 00:37:18 +09:00
Yawning Angel
00ab3beed9 core:crypto/hash: Add a generic higher level hash interface
There is a lot of code duplicated in convenience methods in each hash
implementation, and having a generic hash type makes implementing
higher-level constructs such as HMAC significantly easier down the road.
2024-02-07 00:37:18 +09:00
Yawning Angel
ca10fc2d47 repo: Add yet another test binary to .gitignore 2024-02-07 00:37:18 +09:00
gingerBill
1ed6a484ac Merge pull request #3175 from Murtagy/patch-1
Update raylib.odin
2024-02-06 14:59:35 +00:00
gingerBill
b0675358c3 Add angle_between and matrix2_rotate 2024-02-06 14:09:05 +00:00
Murtagy
456dd22dc4 Update raylib.odin 2024-02-05 21:38:17 +03:00
Damian Tarnawski
23a49ce65b USe intrinsics.matrix_flatten in webgl2.odin 2024-02-05 18:28:03 +01:00
gingerBill
1ebb7f8e9d Merge pull request #3170 from flysand7/run-args-fix
Make run args take the first '--' as the start of the args, instead of the last '--'
2024-02-05 13:58:32 +00:00
gingerBill
4685cf1085 Merge pull request #3140 from JustinRyanH/master
Implement `last_write_time` and `last_write_time_by_name` for Darwin
2024-02-05 13:57:28 +00:00
gingerBill
80a0b161b0 Force 128-bit calls on wasm 2024-02-05 13:51:16 +00:00
gingerBill
27feb5998c Add require to 128-bit and f16 casts 2024-02-05 13:49:10 +00:00
gingerBill
e88db2818b force requiring the 128-bit calls on WASM targets 2024-02-05 13:48:08 +00:00
gingerBill
19535d8721 Add require flags to 128-bit integer procedures 2024-02-05 11:11:28 +00:00
flysand7
8ea8fbeccb Make run args take the first '--' as the start of the args, instead of the last '--' 2024-02-04 14:25:53 +11:00
Jeroen van Rijn
4e300ff90a Merge pull request #3167 from Murtagy/patch-1
Typo in comment in raylib
2024-02-03 17:04:10 +01:00
Murtagy
7bf25a4cf2 typo in comment 2024-02-03 18:43:34 +03:00
gingerBill
5f0f9f477e Merge pull request #3161 from laytan/fix-no-crt-darwin
fix -no-crt on Darwin
2024-02-03 12:30:00 +00:00
gingerBill
dd7c65a89c Merge pull request #2998 from laytan/os-improvements
OS improvements
2024-02-03 12:29:39 +00:00
gingerBill
8620281191 Merge pull request #3163 from laytan/arm-releases-and-ci
Add MacOS ARM releases and CI
2024-02-03 12:25:49 +00:00
gingerBill
c311a60aaf Merge pull request #3164 from FourteenBrush/master
Fix compiler panic: "src/parser.cpp(128): Panic: Unhandled Ast or branch expression"
2024-02-03 12:24:54 +00:00
gingerBill
2993490c75 Merge pull request #3165 from korvahkh/fix-dyn-array-init
Fix #3155
2024-02-03 12:24:40 +00:00
gingerBill
60b324d4ed Merge pull request #3166 from mothfuzz/patch-2
Change ClearMask to ColorMask in webgl.odin
2024-02-03 12:24:10 +00:00
Kay
89a2fdd106 Change ClearMask to ColorMask in webgl.odin
https://registry.khronos.org/OpenGL-Refpages/gl4/html/glColorMask.xhtml
2024-02-02 23:42:37 -06:00
korvahkh
8530829ca4 Fix dynamic array index = value with const value initializing to 0 2024-02-02 15:27:39 -06:00
FourteenBrush
0e5d7801dd Fix code style 2024-02-02 21:17:10 +01:00
Laytan Laats
d5db49a3b0 name the workflows 2024-02-02 21:10:35 +01:00
Laytan Laats
606f11ebe8 fix hxa test use after free, skip weird pow test failure 2024-02-02 21:10:11 +01:00
Laytan Laats
07a4f4d017 add MacOS ARM target to CI and releases 2024-02-02 21:09:57 +01:00
FourteenBrush
d463adfe4f Merge remote-tracking branch 'upstream/master' 2024-02-02 21:01:52 +01:00
FourteenBrush
16bd19ed43 Fix Unhandled Ast_OrBranchExpr 2024-02-02 21:00:00 +01:00
Laytan Laats
eb811e8341 fix -no-crt on Darwin 2024-02-02 19:49:40 +01:00
Justin Hurstwright
8a63b6dff7 fix: remove returns ErrNo for Windows, FreeBSD, Unix 2024-02-02 09:10:25 -06:00
Justin Hurstwright
829654e3a2 steal the last_write from freebsd implementation 2024-02-02 09:10:25 -06:00
gingerBill
cec08114fd Mock out comments 2024-02-02 14:57:22 +00:00
gingerBill
bf90b61908 Fix type_elem_type for complex32 and quaternion64 2024-02-02 14:52:42 +00:00
gingerBill
ae0a5b1a87 RUNTIME_REQUIRE :: false 2024-02-02 12:03:14 +00:00
gingerBill
55ff9b857e Add contextless where missing 2024-02-02 11:51:26 +00:00