Code Monkey home page Code Monkey logo

spsl's People

Contributors

dermojo avatar

Watchers

 avatar

spsl's Issues

Bump clang tools versions

The currently used clang-tidy and clang-format are at v6.0, which becomes more and more outdated.
Check if there's a more recent version available (also on Travis CI).

Feature: Virtual string interface

It would be great to have an interface (pure virtual class) with std::basic_string like methods that hides the underlying string implementation + a template implementation.

Feature: full constexpr support for ArrayString

It shall be possible to construct and query ArrayString[W] instances at compile time.
This means, the following methods shall be constexpr:

  • Default and copy constructors (move isn't possible for constexpr objects)
  • all const methods - size(), data(), find*(), ...

Example:

constexpr spsl::ArrayStringBase<char, 64> a1("I'm a stack-based string and can store 64 characters + NUL");
static_assert(a1.length() == 58, "oops...");

Fix VirtualLock/VirtualUnlock usage - allocate pages

StoragePassword uses VirtualLock/VirtualUnlock on Windows to avoid swapping to disk. This doesn't work properly if multiple instance of the string are instantiated, because Windows doesn't keep a lock count - the first call to VirtualUnlock will enable swapping for the page again.
(need to check on munlock on Linux...)

One solution is to allocate full pages, so there are no conflicts.

Make gsl dependency opt-out

Allow to build without a copy of gsl-lite (e.g. for fully dependency-free offline builds), using some CMake magic.

Mingw support

Currently, only Visual Studio is supported on Windows. Mingw should work as well.

Update to C++17/20

Time to update to a newer standard...
That would allow more constexpr and a lot of cleanup, including removing the custom hash implementation. Also, string functions can be delegated to std::string_view.
StringCore and StringBase can be merged, there's no real benefit in the "reduced" string API set.

Full UTF-8 support in ArrayStorage

When using truncation in ArrayStorage, this can break multi-byte UTF-8 sequences.
First of all, there needs to be clear documentation about this problem, and second, this should be fixed (if possible).

Exclude passwords from core dump

On Linux, it's possible to exclude pages from core dumps by using madvice. Unfortunately, this requires that we work with full pages.
But since we need to use pages for #2 already, this is a viable option that should at least be offered, if it's not on by default.

Use git submodules

Use googletest as submodule instead of relying on an external installation.

Cast alignment in hash function

The MurmurHash3 implementation casts the string array to a uint64_t*, which may break the alignment.
This needs investigation: What happens if the array is unaligned? How can this be fixed?

Allow storing gsl::byte / std::byte

Currently, static_cast<gsl::byte>(0) isn't possible. This prevents storing bytes in any of our string classes.
It's debatable whether this makes sense, because bytes aren't strings, but reusing spsl::PasswordString as a "safe byte storage" container would be beneficial.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.