Skip to content

Instantly share code, notes, and snippets.

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

marcelodevops marcelodevops

🏠
Working from home
  • Full2cloud
  • Sweden
View GitHub Profile
//Generate Symmetric Key (AES with 128 bits)
KeyGenerator generator = KeyGenerator.getInstance("AES");
generator.init(128); // The AES key size in number of bits
SecretKey secKey = generator.generateKey();
//Encrypt plain text using AES
String plainText = "Please encrypt me urgently..."
Cipher aesCipher = Cipher.getInstance("AES");
aesCipher.init(Cipher.ENCRYPT_MODE, secKey);
@marcelodevops
marcelodevops / ec2.py
Created July 14, 2020 05:01 — forked from iMilnb/ec2.py
AWS EC2 simple manipulation script using python and boto3
#!/usr/bin/env python
# Simple [boto3](https://github.com/boto/boto3) based EC2 manipulation tool
#
# To start an instance, create a yaml file with the following format:
#
# frankfurt:
# - subnet-azb:
# - type: t2.micro
# image: image-tagname