Commit Graph

2250 Commits

Author SHA1 Message Date
zhibog
42033ea808 Extended crypto API by variants that write the result into a destination buffer, instead of returning it 2021-12-31 13:16:11 +01:00
gingerBill
c7ff296bef Change the implementation of Priority_Queue to have a better interface that allows for a less and swap procedure 2021-12-30 13:42:10 +00:00
gingerBill
ed8b20da78 Add core:container/priority_queue 2021-12-29 14:38:39 +00:00
gingerBill
c987b84292 Move bash.djbx33a to hash.odin 2021-12-29 12:24:47 +00:00
gingerBill
a9b17b5a37 Add hash.djbx33a 2021-12-29 12:01:07 +00:00
gingerBill
a66f859fb4 Minor improvements to core:container/small_array 2021-12-29 11:58:27 +00:00
gingerBill
c46e7eda1d Add core:container/small_array 2021-12-29 11:26:22 +00:00
Jeroen van Rijn
b0817d136b Merge pull request #1354 from Kelimion/bit_vector
[core:container/bit_array] Create new package.
2021-12-28 15:51:45 +01:00
Jeroen van Rijn
53e30e4621 [core:container/bit_vector] Create new package.
A dynamic bit array, optionally allowing negative indices.
2021-12-28 15:38:12 +01:00
gingerBill
dbf42d2469 make slice.as_ptr return [^]E 2021-12-28 14:16:27 +00:00
gingerBill
36c61aeacf Merge pull request #1350 from thePHTest/json-typo
Fix 'unmarsal' typo in core/encoding/json/unmarshal.odin
2021-12-28 14:11:27 +00:00
gingerBill
5d653a9d8e Merge branch 'master' of https://github.com/odin-lang/Odin 2021-12-28 14:05:18 +00:00
gingerBill
7f61a90ea1 Remove core:container contents 2021-12-28 14:05:09 +00:00
Jeroen van Rijn
6f370fdbf2 Merge pull request #1394 from Tetralux/parse-allman-for
core:odin/parser: Fix parsing of Allman style braces in for loops
2021-12-25 20:24:30 +01:00
Tetralux
a60667e900 core:odin/parser: Fix parsing of Allman style braces in for loops 2021-12-25 19:18:29 +00:00
Tetralux
9b2fe56d14 Parse #no_nil on unions 2021-12-25 18:58:08 +00:00
gingerBill
84d774c7b4 Merge pull request #1382 from Tetralux/rename-to-dynamic
Rename slice.to_dynamic to slice.clone_to_dynamic
2021-12-21 10:26:36 +00:00
Tetralux
e2b36c4004 Rename slice.to_dynamic to slice.clone_to_dynamic 2021-12-21 02:17:24 +00:00
gilles
4ebdb6740e fix math.prod
accumulator was not initialized to one
2021-12-16 18:55:51 +01:00
gingerBill
4423bc0706 Fix typo 2021-12-12 01:10:40 +00:00
Jeroen van Rijn
938744b276 [math/big] Rename internal_int_shl_digit to _private_int_shl_leg.
Same for the SHR variant. These are pure implementation details to shift by a leg/word at a time.
Prevent accidental usage.
2021-12-11 15:22:24 +01:00
gingerBill
84b84d9f7d Fix rat_set_f64 2021-12-11 12:47:05 +00:00
gingerBill
85f8c8df91 Fix fields_proc in strings and bytes 2021-12-11 12:04:34 +00:00
gingerBill
c889591333 Merge branch 'master' of https://github.com/odin-lang/Odin 2021-12-11 12:02:33 +00:00
gingerBill
e2f53ee107 Fix #1362 strings.index_any 2021-12-11 12:02:23 +00:00
Jeroen van Rijn
c771ea9794 Merge pull request #1358 from Kelimion/big_math_fix
[math/big] Return 0, .Integer_Underflow if T = unsigned and bigint is negative.
2021-12-09 16:41:37 +01:00
gingerBill
94bad4d786 Merge branch 'master' of https://github.com/odin-lang/Odin 2021-12-09 15:36:12 +00:00
gingerBill
1d7c9cf872 Make strconv more robust 2021-12-09 15:35:00 +00:00
gingerBill
1e17d5d86f Add utility procedures to get low values 2021-12-09 15:34:35 +00:00
gingerBill
1e9b30666f Minor style change 2021-12-09 15:34:17 +00:00
Jeroen van Rijn
b2b79b86f0 [math/big] Return 0, .Integer_Underflow if trying to get a negative number to an unsigned int. 2021-12-09 16:31:54 +01:00
Jeroen van Rijn
c94098c2ab [math/big] Fix int_set and int_get. 2021-12-09 16:14:04 +01:00
gingerBill
9d4fe90356 Fix bugs in big.Rat caused by typos 2021-12-07 17:35:41 +00:00
Phil H
a7138b22a5 Fix 'unmarsal' typo 2021-12-05 19:04:14 -08:00
Daniel Gavin
f1a126e162 Do not save the comment when peeking. 2021-12-02 22:44:47 +01:00
Daniel Gavin
517c8ff1dd Include Matrix_Type to the is_literal_type switch statement. 2021-11-28 02:14:25 +01:00
gingerBill
6616882708 Correct reading from a console on Windows
e.g. `os.read(os.stdin, buf[:])`
2021-11-27 14:59:35 +00:00
gingerBill
c9c197ba08 Add os.read_at_least and os_read_full utility procedures. 2021-11-27 14:57:49 +00:00
gingerBill
7876660d8c Add new utf16 procedures: decode, decode_to_utf8 2021-11-27 14:57:20 +00:00
gingerBill
07ec93bfeb Add procs_windows_amd64.asm for use with -no-crt 2021-11-24 18:32:27 +00:00
gingerBill
5db505c42f Merge pull request #1277 from Yawning/feature/modern-crypto
core/crypto: Add some "modern" primitives
2021-11-23 17:54:03 +00:00
Dale Weiler
a55f0cfb63 fix memory leak in path.join 2021-11-22 10:25:54 -05:00
gingerBill
f40f12d480 Minor cleanup to math constants 2021-11-21 14:06:32 +00:00
gingerBill
8a2c829e07 Patch odin doc binary format 2021-11-21 14:06:15 +00:00
Gus
56d2bbc5b9 Added back ln for js 2021-11-20 20:03:54 +11:00
Michael Kutowski
4439d59105 add builtin. 2021-11-19 00:24:56 +01:00
gingerBill
12c1291805 Add optional seed parameters to all hashes 2021-11-18 16:14:33 +00:00
Yawning Angel
6bafa21bee crypto: Add rand_bytes
This adds `rand_bytes(dst: []byte)` which fills the destination buffer
with entropy from the cryptographic random number generator.  This takes
the "simple is best" approach and just directly returns the OS CSPRNG
output instead of doing anything fancy (a la OpenBSD's arc4random).
2021-11-17 14:00:00 +00:00
Yawning Angel
61c581baeb core/sys/unix: Add syscalls_linux.odin
Linux is in the unfortunate situation where the system call number is
architecture specific.  This consolidates the system call number
definitions in a single location, adds some wrappers, and hopefully
fixes the existing non-portable invocations of the syscall intrinsic.
2021-11-17 14:00:00 +00:00
Yawning Angel
6c4c9aef61 core/crypto: Add chacha20poly1305
This package implements the chacha20poly1305 AEAD construct as specified
in RFC 8439.
2021-11-17 13:59:53 +00:00