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

fix-key-overriding #17

Merged
merged 1 commit into from
Oct 18, 2020

Conversation

SanchitJain123
Copy link
Collaborator

If key.pem already existed then its contents was getting overrided and
some left over bytes were corrupting the key data. Removed key.pem file
before saving key.pem file. Fixed some typos.
Fixes issue in #15

If key.pem already existed then its contents was getting overrided and
some left over bytes were corrupting the key data. Removed key.pem file
before saving key.pem file. Fixed some typos.
Fixes issue in rexdivakar#15
@SanchitJain123
Copy link
Collaborator Author

@rexdivakar can you please check now if it's working?

@rexdivakar
Copy link
Owner

hey buddy the problem is It's not able to decrypt the code back,

image

@SanchitJain123
Copy link
Collaborator Author

@rexdivakar very strange it's working on my machine. Can you please tell the steps to reproduce the issue, it would be helpful because its working fine in my machine. I had tried both file decryption as well as folder decryption.

@SanchitJain123
Copy link
Collaborator Author

@rexdivakar after this commit there should not be any problem. I'll post screenshot of the decryption after this commit here just to be sure the steps you are following are same.

@SanchitJain123
Copy link
Collaborator Author

Output

@SanchitJain123
Copy link
Collaborator Author

@rexdivakar the problem of the decryption failure was that the key.pem file was getting overridden by the contents of the new key. Because the old key.pem already existed the contents were getting mixed (old + new) and the key was getting hampered, that is why the decryption was failing in folder maybe the key.pem already existed during the encryption process. That is why i have added a check to delete key.pem file if its already exists in the current folder during the encryption process. This commit/PR should solve it.

@rexdivakar rexdivakar merged commit 3b25fd4 into rexdivakar:master Oct 18, 2020
@rexdivakar
Copy link
Owner

Great job buddy, u fixed it !! @SanchitJain123

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.

2 participants