Skip to content

Make AES256CBC independant of class variables. #32

Description

@metalurgical

The variables defined here are a code smell:

private byte[] AES_ENCRYPTION_KEY;
private byte[] ENCRYPTION_IV;
private byte[] MAC_KEY;
private byte[] ENCRYPTION_EPHEM_KEY;

They should rather be passed in as parameters to the relevant functions. This way an instance of this class is reusable for all encrypt and decrypt operations and no additional cognitive overhead is needed to keep track of which instance contains what.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions