Skip to content

vijay84-projects/CAPSTON

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

import cv2 import os import string

img = cv2.imread("off pic.jpg") # Replace with the correct image path

msg = input("Enter secret message:") password = input("Enter a passcode:")

d = {} c = {}

for i in range(255): d[chr(i)] = i c[i] = chr(i)

m = 0 n = 0 z = 0

for i in range(len(msg)): img[n, m, z] = d[msg[i]] n = n + 1 m = m + 1 z = (z + 1) % 3

cv2.imwrite("encryptedImage.jpg", img) os.system("start encryptedImage.jpg") # Use 'start' to open the image on Windows

message = "" n = 0 m = 0 z = 0

pas = input("Enter passcode for Decryption") if password == pas: for i in range(len(msg)): message = message + c[img[n, m, z]] n = n + 1 m = m + 1 z = (z + 1) % 3 print("Decryption message:", message) else: print("YOU ARE NOT auth")

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages