Тёмный
No video :(

AES encryption in python | Lec-25 

MANISH KUMAR
Подписаться 21 тыс.
Просмотров 1 тыс.
50% 1

In this video, I have talked about the fundamentals of programming and Python. If you complete this, you will be well-versed in using tuples for different use cases.
Directly connect with me at:- topmate.io/man...
Source Code:-
#Requirements:- pip install pycryptodome
pip install pycryptodomex
import base64
from Cryptodome.Cipher import AES
from Cryptodome.Protocol.KDF import PBKDF2
import os, sys
from loguru import logger
try:
key = "key1"
iv = "my_username_pass"
salt = "salt"
if not (key and iv and salt):
raise Exception(F"Error while fetching details for key/iv/salt")
except Exception as e:
logger.error("Error occurred. Details: %s", e)
sys.exit(0)
BS = 16
pad = lambda s: bytes(s + (BS - len(s) % BS) * chr(BS - len(s) % BS), 'utf-8')
unpad = lambda s: s[0:-ord(s[-1:])]
def get_private_key():
Salt = salt.encode('utf-8')
kdf = PBKDF2(key, Salt, 64, 1000)
key32 = kdf[:32]
return key32
def encrypt(raw):
raw = pad(raw)
cipher = AES.new(get_private_key(), AES.MODE_CBC, iv.encode('utf-8'))
return base64.b64encode(cipher.encrypt(raw))
def decrypt(enc):
cipher = AES.new(get_private_key(), AES.MODE_CBC, iv.encode('utf-8'))
return unpad(cipher.decrypt(base64.b64decode(enc))).decode('utf8')
print(encrypt("manish"))
print(decrypt("U1AMRIQSTYosVJCmmqUHnA=="))
Discord channel:- / discord
For more queries reach out to me on my below social media handle.
Follow me on LinkedIn:- / manish-kumar-373b86176
Follow Me On Instagram:- / competitive_gyan1
Follow me on Facebook:- / manish12340
My Second Channel -- / @competitivegyan1
Interview series Playlist:- • Interview Questions an...
My Gear:-
Rode Mic:-- amzn.to/3RekC7a
Boya M1 Mic-- amzn.to/3uW0nnn
Wireless Mic:-- amzn.to/3TqLRhE
Tripod1 -- amzn.to/4avjyF4
Tripod2:-- amzn.to/46Y3QPu
camera1:-- amzn.to/3GIQlsE
camera2:-- amzn.to/46X190P
Pentab (Medium size):-- amzn.to/3RgMszQ (Recommended)
Pentab (Small size):-- amzn.to/3RpmIS0
Mobile:-- amzn.to/47Y8oa4 ( Aapko ye bilkul nahi lena hai)
Laptop -- amzn.to/3Ns5Okj
Mouse+keyboard combo -- amzn.to/3Ro6GYl
21-inch Monitor-- amzn.to/3TvCE7E
27-inch Monitor-- amzn.to/47QzXlA
iPad Pencil:-- amzn.to/4aiJxiG
iPad 9th Generation:-- amzn.to/470I11X
Boom Arm/Swing Arm:-- amzn.to/48eH2we
My PC Components:-
intel i7 Processor:-- amzn.to/47Svdfe
G.Skill RAM:-- amzn.to/47VFffI
Samsung SSD:-- amzn.to/3uVSE8W
WD Blue HDD:-- amzn.to/47Y91QY
RTX 3060Ti Graphic card:- amzn.to/3tdLDjn
Gigabyte Motherboard:-- amzn.to/3RFUTGl
O11 Dynamic Cabinet:-- amzn.to/4avkgSK
Liquid cooler:-- amzn.to/472S8mS
Antec Prizm FAN:-- amzn.to/48ey4Pj

Опубликовано:

 

29 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 17   
@learnomate
@learnomate 3 месяца назад
Can you please confirm which software you are using for writing purpose?
@manish_kumar_1
@manish_kumar_1 3 месяца назад
Journal ++
@RohitThakur-xu5wd
@RohitThakur-xu5wd 3 месяца назад
Is this playlist help for a person who want to be a data analyst . if yes then can you teach us about the libraries used in Data Analysis such as numpy, panda , matplotlib, seaborn. Thank you for your time in advance
@manish_kumar_1
@manish_kumar_1 3 месяца назад
This is helpful for anyone who uses python as a programming language. I will see how may libraries I will cover. Numpy, mat plot and seaborn I won't cover for sure. But pandas may be
@user-jh5ff2gm3s
@user-jh5ff2gm3s 3 месяца назад
sir map,fiter,reduce function kb pdhaoge
@AnkitChoudhary-ri9jp
@AnkitChoudhary-ri9jp 3 месяца назад
Bhaiya jo aao bata raha tha ak dusra play list rahega wo kab ayega
@manish_kumar_1
@manish_kumar_1 3 месяца назад
Code solve karne wala?
@AnkitChoudhary-ri9jp
@AnkitChoudhary-ri9jp 3 месяца назад
Ha bhaiyaaa
@manish_kumar_1
@manish_kumar_1 3 месяца назад
May be after 2 or 3 weeks we will start again.
@PranshuHasani
@PranshuHasani 3 месяца назад
you didn't provide code in the description.
@manish_kumar_1
@manish_kumar_1 3 месяца назад
Oh sorry. I will add in 1 hour or so
@bhargavnagineni9322
@bhargavnagineni9322 3 месяца назад
Can you tell me python topics for data engineering
@manish_kumar_1
@manish_kumar_1 3 месяца назад
Python coding Oop concept Reading and writing files API methods and it's usage
@bhargavnagineni9322
@bhargavnagineni9322 3 месяца назад
@@manish_kumar_1 is there any specific topics like.. NumPy, panda, etc for python topics
@hritikapal683
@hritikapal683 3 месяца назад
​@@bhargavnagineni9322good to have them in your portfolio
@mohammadfurquan241
@mohammadfurquan241 3 месяца назад
​@@manish_kumar_1 which api a fresher must learn ? Please reply
@manish_kumar_1
@manish_kumar_1 3 месяца назад
@@mohammadfurquan241 you can start with FAST API
Далее
mysql installation on windows 11 | Lec-26
8:12
Professional Data Encryption in Python
11:12
Просмотров 56 тыс.
Chelsea gym be like.. 😅⚽️
00:20
Просмотров 15 млн
what will you choose? #tiktok
00:14
Просмотров 7 млн
Concerning the Stranded Astronauts
13:27
Просмотров 489 тыс.
AES Encryption and Decryption
13:24
Просмотров 89 тыс.
The Most Legendary Programmers Of All Time
11:49
Просмотров 553 тыс.
configuration file handling in python | Lec-24
35:50
Просмотров 1,3 тыс.
5 Useful F-String Tricks In Python
10:02
Просмотров 299 тыс.
*args and **kwargs in python | Lec-22
33:21
Просмотров 1,4 тыс.
Chelsea gym be like.. 😅⚽️
00:20
Просмотров 15 млн