This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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); |