Skip to content

Instantly share code, notes, and snippets.

View Ksisu's full-sized avatar

Kristóf Horváth Ksisu

View GitHub Profile
@Ksisu
Ksisu / Cryptor.scala
Created May 18, 2018 15:25
Simple cryptor with AES GCM
import java.security.SecureRandom
import java.util.Base64
import javax.crypto.spec.{GCMParameterSpec, SecretKeySpec}
import javax.crypto.{Cipher, KeyGenerator, SecretKey}
object Cryptor {
def main(args: Array[String]): Unit = {
val cryptor = new Cryptor("84AmEdqF7YTruR2o4^2BfwkSA0weHtEVgHz$7Rqy".getBytes)