Skip to content

Instantly share code, notes, and snippets.

View password123456's full-sized avatar
🏠
Working from home

password123456 password123456

🏠
Working from home
  • SouthKorea, on earth
View GitHub Profile
@password123456
password123456 / aes-gcm.py
Created September 5, 2024 23:31
encrypt, decrypt the strings to use access-key. validate its expiration and IP address in a key
# requirements
# pip install cryptography
import os
import sys
import json
from datetime import datetime, timedelta
from base64 import b64encode, b64decode
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
from cryptography.hazmat.backends import default_backend