-
Notifications
You must be signed in to change notification settings - Fork 4
/
image_enryption_using_3_des.py
83 lines (47 loc) · 1.5 KB
/
image_enryption_using_3_des.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# -*- coding: utf-8 -*-
"""IMAGE_ENRYPTION USING 3 DES.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1RBYxkRhs2IZHMPjbJFLBZk0ZfoDiR8e7
**IMAGE SECURITY SYSTEM FOR ARMY, POLICE & SECURE COMMUNICATION**
**IMAGE ENCRYPTION & DECRYPTION USING TRIPLE DES**
**LOAD LIBRARIES**
"""
# Commented out IPython magic to ensure Python compatibility.
# %pylab inline
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import io
!pip install pyDes
from pyDes import *
"""DEFINE FUNCTION"""
# Function to Display Image
def imgdis(path):
"""
Function to display an image.
Parameter : Path of image file
"""
img = mpimg.imread(path)
imgplot = plt.imshow(img)
plt.show()
"""ENCRYPTION USING TRIPLE DES"""
# Function to Encrypt an File with Triple DES
def encrypt(key, path, output = 'Encrypted'):
"""
Function to Encrypt an File with Triple DES
Parameters : path, key, output;
Key : Takes a Key for the Encryption Process.
Path : Takes Absolute or Relative Path of File as Input.
Output : Takes Absolute or Relative Path of File as Output.
Returns : An Encrypted File.
"""
"""WAIT !!!
---
Project Code is longer it involves many step for Encryption and
Decryption for Image.
It's Top Class Projects.
---
## Mail me at **[email protected]** for Full Project Code with Project Report and PPT
Mail me for any kind of Help in Projects.
# Mail me at **[email protected]** Now for Projects
"""