Skip to content

3DES Encryption algorithm implementation in Java#2

Open
kochniev wants to merge 11 commits intoyyunikov:masterfrom
kochniev:master
Open

3DES Encryption algorithm implementation in Java#2
kochniev wants to merge 11 commits intoyyunikov:masterfrom
kochniev:master

Conversation

@kochniev
Copy link
Copy Markdown

  • The application takes arguments from command line, the first argument is an encryption key, the second is text to be encrypted
  • If encryption key and encryption text weren't passed from the command line, the application will try reading them from environment variables ENCRYPTION_KEY TEXT_TO_ENCRYPT
  • The application uses a 24 bit encryption key and 8 bit initialization vector
  • Encryption key and initialization vector use SHA1PRNG for key generation
  • DESede/CBC/PKCS5Padding is used as transformation
  • Null values are not encrypted, if null used as an input for the encrypt method, the method will immediately return the null reference. The same applies to the decrypt method

koco and others added 11 commits May 27, 2020 16:23
…th the SecretKey class. Avoid allocating new SecretKeySpec object on each encryption/decryption. Increase test coverage on EncryptionKeyServiceImpl.java
…e-throwing checked exceptions in TripleDesEncryptionImpl.java
…ey and encryption text from environment variables if they weren't passed as the program arguments
…d missing surefire maven plugin to run tests. Avoid System.exit in the main method in order to facilitate testing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant