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

Panic on empty input for Secure Cell #363

Closed
wants to merge 1 commit into from

Commits on Feb 3, 2019

  1. Panic on empty input for Secure Cell

    It does not make much sense to use an empty master key for encryption,
    or encrypt or decrypt empty messages. Secure Cell does not allow such
    inputs and returns errors if the user insists. Additionally, context
    imprint mode of Secure Cell requires a non-empty user context.
    
    The programmers should never really use Secure Cell in this way. If an
    empty key, or message, or token, or user context is used anywhere then
    it's most likely to be a programming error. Therefore treat it as such
    -- like using an invalid index with a slice -- and panic instead of
    returning an error code if we encounter empty inputs.
    ilammy committed Feb 3, 2019
    Configuration menu
    Copy the full SHA
    2f6cf0e View commit details
    Browse the repository at this point in the history