Skip to content

Encryption is the process of converting information or data into a secrete code, especially to prevent unauthorized access. In these cases also we will do the same, For encryption, we will convert the image into a byte array and after converting it we will apply XOR operation on each value of the byte array and after performing XOR operation on …

Notifications You must be signed in to change notification settings

Tabishhaider72/Image-Encryption-and-Decryption-using-Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Image-Encryption-and-Decryption-using-Java

86a3ddc80ddaed757b665af757801981

Encryption is the process of converting information or data into a secrete code, especially to prevent unauthorized access. In these cases also we will do the same, For encryption, we will convert the image into a byte array and after converting it we will apply XOR operation on each value of the byte array and after performing XOR operation on each and every value of byte array will be changed. After performing the operation now we will write new data in Image due to which we are unable to open the Encrypted Image. Here are key will act as a password to Encrypt and Decrypt the Image. As we know that how to perform XOR operations now we will see how XOR operation will work here. Let’s consider an example of sample input and output.

Input:

int key = 8 int byte_val = 5 Operation:

// Performing XOR operation between key and byte_val key ^ byte_val
Output:

// Output of XOR operation 13
Operation:

// Performing XOR operation between output and key 13 ^ key
Output: // byte_val 5

Example:

EncryptandDecryptImageusingJava

Project screenshot:

Screenshot 2022-04-07 151726

Screenshot 2022-04-07 151906

About

Encryption is the process of converting information or data into a secrete code, especially to prevent unauthorized access. In these cases also we will do the same, For encryption, we will convert the image into a byte array and after converting it we will apply XOR operation on each value of the byte array and after performing XOR operation on …

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages