Rocknest
b6385870d0
Convert asserts to errors, make sure nothing overflows
2020-09-13 22:39:54 +03:00
Rocknest
a6d947191e
Merge pull request #2 from rnapier/pbkdf2
...
Pbkdf2
2020-09-13 22:09:45 +03:00
Rob Napier
85366771ea
pbkdf2 offset into dk should be usize, not u64.
2020-09-13 12:36:32 -04:00
Rocknest
dcd229be92
Merge pull request #1 from rnapier/pbkdf2
...
Pbkdf2
2020-09-13 19:11:29 +03:00
Rob Napier
2f9c9662ba
Use comptime to expose public method to doc system
2020-09-13 11:17:58 -04:00
Rob Napier
8a1a40276f
Extract kdf.zig to provide namespace documentation
2020-09-13 11:08:06 -04:00
Rob Napier
257c5b5348
Explicitly reference std.crypto.kdf in test case
2020-09-13 10:50:46 -04:00
Rob Napier
0f85b85acb
Improve doc text
2020-09-13 09:59:36 -04:00
Rob Napier
17156e1775
pbkdf2 "very large dklen test" should just check for crashes
2020-09-12 18:33:53 -04:00
Rob Napier
3f450b7e93
Replace Hash function with Prf. Correct offset bit-width.
2020-09-12 18:17:04 -04:00
Rob Napier
37db93e426
Review comments from pbkdf2.zig
...
Move block definitions inside while loop.
Use usize for offset. (This still crashes on overflow)
Remove unneeded slice syntax.
Add slow test for Very large dkLen
2020-09-12 15:03:42 -04:00
LemonBoy
9fe4c89230
std: Add a gzip decoder
2020-09-11 20:02:41 -04:00
Andrew Kelley
1edf097871
Merge pull request #6323 from LemonBoy/fast-zlib
...
std: Make the DEFLATE decompression routine 3x faster
2020-09-11 17:25:18 -04:00
Rob Napier
c2b02d01d5
Add crypto.kdf.pbkdf2
2020-09-11 17:10:27 -04:00
Andrew Kelley
1eaf0691f9
Merge pull request #6320 from ifreund/prctl
...
std: add prctl and securebits definitions for linux/C
2020-09-11 16:33:57 -04:00
Isaac Freund
1078810cef
std: add prctl definition when linking libc
2020-09-11 22:32:23 +02:00
Isaac Freund
b6f4601545
std: add securebits definitions for linux
2020-09-11 22:32:23 +02:00
Isaac Freund
744b73ab46
std: add prctl wrapper to std.os
2020-09-11 22:32:23 +02:00
Isaac Freund
7b961a876b
std: add prctl definition for linux
2020-09-11 22:32:22 +02:00
Andrew Kelley
42c32dbc7b
Merge pull request #6315 from ifreund/optional-shlib-version
...
std, stage1: make shared library versioning optional
2020-09-11 16:07:13 -04:00
LemonBoy
4b851c7255
Re-enable a compression test
...
It somehow got commented out...
2020-09-11 21:04:08 +02:00
LemonBoy
41f244bd2f
std: Make the DEFLATE decompression routine 3x faster
...
A profiler run showed that the main bottleneck was the naive decoding of
the Huffman codes, replacing it with a nice trick borrowed by Zlib gave
a substantial speedup.
Replacing a `%` with a `and (mask-1)` gave another significant
improvement (yay for low hanging fruits).
A few numbers obtained by decompressing a 22M file:
Before:
```
./decompress 2,39s user 0,00s system 99% cpu 2,400 total
```
After:
```
./decompress 0,79s user 0,00s system 99% cpu 0,798 total
````
2020-09-11 21:00:15 +02:00
Isaac Freund
0a76a9bd73
std, stage1: make shared library versioning optional
...
This commit changes the behavior of stage1 to emit libfoo.so instead
of libfoo.so.0.0.0 when none of the --ver-major, --ver-minor, or
--ver-patch flags are set.
It also makes it possible to create unversioned shared libraries
using the zig build system, changing the version parameter of
addSharedLibrary() to a tagged union.
2020-09-11 10:46:37 +02:00
Isaac Freund
68bf29c31e
std: allow overriding install dir of artifacts
...
This is necessary when, for example, writing a PAM module which should
be installed to lib/security/module_name.so.
2020-09-11 04:32:36 -04:00
Andrew Kelley
c41cd3e13a
std.fs.File: fix typo in writeFileAll
2020-09-10 18:53:20 -07:00
Andrew Kelley
800c5de2ae
update the stack trace test case for lines added to start.zig
2020-09-10 14:40:33 -07:00
Andrew Kelley
2315331d23
Merge pull request #5527 from shawnanastasio/ppc64le
...
Implement support for powerpc64{,le}
2020-09-10 15:56:27 -04:00
Christian Wesselhoeft
ea9b38c93c
fs/file.zig: Update reader to use type alias
...
This is a minor cosmetic change which updates `reader` and `inStream`
to match `writer` and `outStream` below.
2020-09-10 15:42:24 -04:00
Isaac Freund
13b8c63834
std: complete C definitions for uid/gid setters
...
Also:
- correct the definition of setgid
- update the existing definitions to use the uid_t/gid_t types
2020-09-10 15:41:52 -04:00
Isaac Freund
bb9773f695
std: fix errorset of std.os.seteuid/setegid
2020-09-10 15:41:21 -04:00
Isaac Freund
486a774e5f
std: add option to use single-threaded event loop
...
std.event.Loop does not yet work in single threaded builds. However,
using evented io on a single thread can be very convenient. This commit
allows settind @import("root").event_loop_mode to .single_threaded
in order to allow this without reimplementing the startup code in
start.zig
2020-09-10 15:40:38 -04:00
Isaac Freund
4170f3f77f
std: fix bitrot in process.posixGetUserInfo()
2020-09-10 14:30:07 -04:00
Literally Void
78baa16da0
Fix issue #6303 : iterating empty PriorityQueue crashes
2020-09-10 12:00:53 +03:00
Jakub Konka
7d487a4162
Merge pull request #6289 from kubkon/macho
...
macho: fix bug where __text section would get overwritten
2020-09-09 09:00:24 +02:00
Zachary Meadows
edc40157eb
Switch type of HashMap's count from usize to u32 ( #6262 )
2020-09-09 00:33:14 -04:00
Jakub Konka
9306dbd619
Fix bug where __text section would get overwritten
...
Fixes a bug where the last written load command would accidentally
override the beginning of the __text section. Also defines missing
MachO constants and relocation structs/enums.
Signed-off-by: Jakub Konka <kubkon@jakubkonka.com>
2020-09-08 20:55:06 +02:00
Mark Barbone
42b1b6be90
Add resize for arena allocator
2020-09-08 13:04:14 -04:00
Jens Goldberg
5bf3e54018
Add the Linux TCP socket options
2020-09-08 13:00:07 -04:00
Andrew Kelley
f6f0e09456
Merge pull request #6267 from mattnite/btf
...
BPF: add BTF
2020-09-08 12:59:31 -04:00
xackus
b8b68cb279
std: clean up bitrotten imports in crypto
2020-09-08 12:54:28 -04:00
Timon Kruiper
61cd9099e2
Zlib: Make deinit function public
2020-09-08 12:21:49 -04:00
LemonBoy
2328f40b7a
std: Add DEFLATE and zlib decompressors
2020-09-07 14:59:46 -07:00
Matt Knight
a496f94be9
added map create, update, delete, and prog load
2020-09-07 15:42:41 -04:00
Matthew Knight
db7a238297
BPF: add some more documentation ( #6268 )
...
* added documentation for ringbuffers, which context type maps to which program type, and added some formatting
2020-09-07 15:41:29 -04:00
Andrew Kelley
f96f3265b5
Merge pull request #6265 from mattnite/bpf-finish-insns
...
BPF: Implement rest of pseudo instructions
2020-09-07 15:39:42 -04:00
Matt Knight
b878a64a5f
added license comments
2020-09-07 12:26:41 -07:00
Vincent Rischmann
533bfc68bf
big int: fix Managed.dump()
2020-09-07 20:44:01 +03:00
Peter Spiess-Knafl
eca20b5e03
Fix compile when using EFI target ( Fixes #6275 )
2020-09-07 20:40:11 +03:00
Matt Knight
cf3194804e
changed enums to lower case
2020-09-07 07:17:21 -07:00
Matt Knight
e7547eeefa
fixed missing 'packed' keyword
2020-09-06 22:31:35 -07:00