summaryrefslogtreecommitdiffstats
path: root/src/armor.rs
AgeCommit message (Collapse)Author
2017-11-28Implement autodetection of type when reading armored data.Justus Winter
- Add 'Kind::Any' that can be used with the reader. - Add a function to inspect the detected type.
2017-11-28Fix out-of-bounds access.Justus Winter
- Fix filling the stash when buffers of size one are passed to 'write'. - Add a test demonstrating the problem.
2017-11-28Return the correct number of bytes written.Justus Winter
- Return the number of unencoded bytes written. Assert that the return value is sane. - Improve the test so that it demonstrates the problem.
2017-11-28Fix corner case.Justus Winter
- When armoring data of size zero, make sure that the header is written even if 'write' is never called.
2017-11-27Fix the size of the stash.Justus Winter
- Base64 encodes three bytes in four. We stash unencoded bytes, therefore we need to stash at most two bytes. Assert that in interesting places. - Reverse the items in the stash directly after populating it. This is is less surprising for the reader.
2017-11-27Implement reading ASCII Armored files.Justus Winter
2017-11-24Implement writing ASCII Armored files.Justus Winter