Commit graph

36 commits

Author SHA1 Message Date
Neven Sajko
8750c16425 all: redesign errors in memguard and memguard/core
Memcall is not touched yet. Otherwise this replaces sentinel error
values with IsX exported predicate functions. This enables more
effective error handling by the users and leaves much more freedom for
changing the implementation in the future without breaking API.

Updates #111
2019-08-01 17:12:33 +00:00
Awn
843870774d
optimise buffer state methods (#103) 2019-07-25 23:01:20 +01:00
Awn
1095ba2fd0
Don't panic on zero size object request (#102) 2019-07-25 22:44:50 +01:00
Awn
14e0f189a5
feature: construct buffer from entire reader (#98) 2019-07-20 13:02:08 +01:00
Awn Umar
048bc2c3fa
docs: update docstring to clarify condition 2019-06-27 23:26:03 +01:00
Awn Umar
d1fab822e1
patch: missed condition when first byte is delim 2019-06-27 23:23:57 +01:00
Awn Umar
844cf6fa7c
Minor cleanup 2019-06-27 22:35:25 +01:00
Awn
7571cc11d7
Merge branch 'master' into nil 2019-06-27 19:31:23 +01:00
Awn
c442926a73
Merge branch 'master' into patch/drop 2019-06-27 19:12:12 +01:00
Awn Umar
41d09af92c
Can return nil in Open as an error is returned with it 2019-06-27 19:07:59 +01:00
Awn Umar
f7c9e971ed
Return usable objects instead of nils 2019-06-27 19:00:41 +01:00
Awn Umar
26ac1480a1
Write generic core.Buffer -> LockedBuffer helper 2019-06-27 17:42:44 +01:00
Awn Umar
7bc6f2b151
Add String method 2019-06-27 16:44:39 +01:00
Awn Umar
27cfafb799
Add Reader method 2019-06-27 11:39:06 +01:00
Awn Umar
285decd3d6
Wait another loop before expanding buffer size 2019-06-27 09:10:45 +01:00
Awn Umar
f3274296cc
Make constructed buffers immutable 2019-06-26 20:50:25 +01:00
Awn Umar
a0c6982f3e
feature: implement buffer constructors from readers 2019-06-26 20:05:40 +01:00
Awn Umar
a31b3b4446
docs: updates for clarity and readability 2019-05-30 10:04:45 +01:00
Awn Umar
3ea58f31a7
remove clone; implement tests and repr methods 2019-05-26 19:08:26 +01:00
Awn Umar
61e6b4f8d7
feature: add clone and {move/copy}at methods 2019-05-17 14:22:12 +01:00
Awn Umar
5094398556
make buffer list private & modify slice type cast behaviour 2019-05-15 17:47:28 +01:00
Awn Umar
9fa7db65b9
revert: custom entropy pool
Seemed like a good idea but further tests revealed that it only behaved well with low buffer sizes. As the size of the given buffer increased, the performance of Scramble degraded way faster than the equivalent rand.Read call did.
2019-05-14 15:13:30 +01:00
Awn Umar
60cf168a6e
Prefer panic to nil returns 2019-05-14 11:41:31 +01:00
Awn Umar
8265a2536d
crypto: use local custom emtropy pool 2019-05-13 17:08:37 +01:00
Awn Umar
a684db30dc
Make data field unexported in core; use method instead 2019-05-13 02:45:54 +01:00
Awn Umar
cedf76e71c
Implement more of the test suite 2019-05-11 18:50:49 +01:00
Awn Umar
c93b1b069c
patchset: some changes and streamlining
There are some known issues in this code at the moment and parts of the frontend API exist have not yet been stabalised or tested.
2019-05-01 18:13:17 +01:00
Awn Umar
c6e96427c3
Simplify errors 2019-03-22 22:25:20 +00:00
Awn Umar
6124ddef7d
Update some docs 2019-03-22 20:09:11 +00:00
Awn Umar
d8a98b9267
Rename to trigger test 2019-03-22 03:41:16 +00:00
Awn Umar
8740253ea8
some improvements to errors 2019-03-21 22:28:44 +00:00
Awn Umar
93fdada0a1
patch: make use of start arg and add ByteArray8 2019-03-21 20:57:48 +00:00
Awn Umar
5ec2b2fbe5
refactor: move buffer related functions into method fold 2019-03-21 20:30:09 +00:00
Awn Umar
9ab9bcc12d
patch: remove unused arguments 2019-03-21 19:03:49 +00:00
Awn Umar
5583953cd7
Port a bunch more things. Still need to work on Enclaves and writing tests and examples and docs. 2019-03-21 18:58:07 +00:00
Awn Umar
0fbce73920
Missing stuff? 2019-03-21 05:40:51 +00:00