Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] error handling in stegano-core #7

Open
sassman opened this issue Sep 18, 2020 · 0 comments
Open

[FEAT] error handling in stegano-core #7

sassman opened this issue Sep 18, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@sassman
Copy link
Member

sassman commented Sep 18, 2020

stegano-core is the library for stegano-cli, by this it should handle error cases as like a library and should never panic

  • extend error codes for all error scenarios
  • extend tests to cover the error cases
  • no panic inside the lib
  • handle the error enums in the CLI and give clear error messages with suggestion to the end user
@sassman sassman self-assigned this Sep 18, 2020
@sassman sassman added this to the v0.5.0 milestone Sep 22, 2020
@sassman sassman added the enhancement New feature or request label Sep 22, 2020
sassman added a commit that referenced this issue Sep 29, 2020
 - relates to #7
 - implement error types for handling carrier media capacity issue
 - not panic but bubble up from core a sufficient Err
 - display a nice error message with suggestions to users
 - adding anyhow dependencies
sassman added a commit that referenced this issue Sep 29, 2020
 - relates to #7
 - implement error types for handling carrier media capacity issue
 - not panic but bubble up from core a sufficient Err
 - add description to CHANGELOG.md
sassman added a commit that referenced this issue Oct 6, 2023
- make the message struct creation fallible
- apply the necessary fallible code all the layers up
- add an old demo image format for tests
github-merge-queue bot pushed a commit that referenced this issue Sep 4, 2024
* feat(message): rework message format compatibility

- ensure read compatibility with older message formats, for example, from stegano pro v2.1.1.9
- ensure old message formats are auto upgraded to the current formats

* feat(message): rework message format compatibility

- force message format parameter

* chore(deps): upgrade some dependencies

* feat!: #7 error handling in stegano-core

- make the message struct creation fallible
- apply the necessary fallible code all the layers up
- add an old demo image format for tests

* fix: build

* fix: some build pipeline updates

* fix: the whole iterator topic so that the .net bug is eventually replicated.

That means the maximum width and height is x-1

* chore(deps): move from `zip` to `zip_next`, refine features used by dependencies, get rid of unused deps

* feat(demo-images): add some more older version and newer version generated demo images, all from the windows version

* chore(deps): cargo update + criterion update

* fix(tests): fix tests and the iterator impls

* fix: lints

* feat(jpeg-decoder): add a fork of the jpeg-decoder crate

- move stegano-core and stegano-cli into a crates folder
- add the jpeg-decoder to crates as well

* fix(bench:audio): fix wrong paths on the audio benchmarks

* chore(deps): bump several dependencies

* fix(bench:image): fix wrong paths on the image benchmarks

* fix(lints): make clippy happy

* fix(ci): update and overhault deps on the ci pipeline

* fix(ci): update and overhaul deps on the ci pipeline

* fix(ci): variable typo

* fix(ci): variable typo

* fix(ci): fix dynamic toolchain on matrix build

* feat(seasmoke): add first draft of stegano-seasomke

- that provides 2 simple en/decryption functions
- couple of tests
- exposes a ffi and allows for dlyb builds

* fix(ci): the rust toolchain

* fix(lints): make clippy happy

* outcomment new code that will come next

* fix(ci): missing cargo-binstall

* feat(ci:coverage): use region coverage with codecov instead of line coverage

* feat(ci:coverage): add a codecov config so that we get PR comments

* chore: migrate files from str/string args to Path

* add test for unsupported message

* chore: make sure filename extraction is happening at most inner function

* chore: add byte buffer tests

* feat(msg:cipher): implement message encryption and decryption

- refactor payload related factory and traits further
- introduce a `payload::legacy` module for keeping the legacy only factories around
- break up the `FabA` factory, that does way to much
- better separation for the feature based codecs and the legacy codecs, also for their factories
- ensure the password is handed in from the cli to the cipher factory

TODO:

- rethink the way how payload factory and codec could be wired together maybe with Associated types like GATs
- rethink the complexity on the play of Message, Factory and Codec, it just feels too overcomplicated

* add coverage-helper to see if test code can be excluded from the coverage report

* remove the attribute

* feat: migrate away from unmaintained `zip_next` to `zip@v2`

* feat: migrate from cargo-audit to cargo-deny

* chore: upgrade to clap latest version + add env_logger and log to get more error insights

* fix: #121 better error message for too small carrier images

* feat: migrate to derive macros of clap

* feat(api): refactor cli commands and core api

- separate cli subcommands by files
- introduce a `api` mod in stegano_core
- let stegano_core commands dogfood the new `api`
- [ ] implement unveil_raw
- [ ] introduce `conceil` and `reveil` as new subcommands and api that insists on passwords used, deprecate the other subcommands with a note that using no passwords is too insecure

* docs: add the encryption documentation

* docs: update the crate module docs, use now the new api in the samples

* docs: add method docs to the hide api

* docs: add method docs to the unveil api

* add few more tests for hide api

* add few more tests for hide api

* feat: introduce the password type

* cleanup: drop `core::command` api, in favor of the new `stegano_core::api` module

also:
- refine the `RawMessage` struct, to support also the `PayloadCodecFactory`

* add `impl AsRef<[u8]>` for `RawMessage`

* docs: update the module docs

* docs: more update on consitency and related stuff

* feat: add interactive password asking if none was provided

* only use one password interaction funtion

* get rid of speculate, pull few deps up to the workspace manifest

* remove very old unused code

* reduce the exposed api surface, cleanup old code, reimplement benchmarks as micro benchmarks with nightly features

* fix fmt issues

* fix linting

* fix coverage creation

* minor rearrange of use

* fix lints
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant