Here you can find the source of generateKey()
Parameter | Description |
---|---|
Exception | an exception |
private static Key generateKey() throws Exception
//package com.java2s; /* /*from w ww.ja va2s. c o m*/ * Exactly * Author: Nouman Tayyab (nouman@avpreserve.com) * Author: Rimsha Khalid (rimsha@avpreserve.com) * Version: 0.1.4 * Requires: JDK 1.7 or higher * Description: This tool transfers digital files to the UK Exactly * Support: info@avpreserve.com * License: Apache 2.0 * Copyright: University of Kentucky (http://www.uky.edu). All Rights Reserved * */ import java.security.*; import javax.crypto.spec.SecretKeySpec; public class Main { private static final String ALGO = "AES"; private static final byte[] keyValue = new byte[] { '$', 'u', 'k', '_', 'S', 'i', 'p', '9', 'e', 'r', 'f', '1', 'y', 'K', '3', 'Y' }; /** * generate Key using salt and algo * @return key * @throws Exception */ private static Key generateKey() throws Exception { Key key = new SecretKeySpec(keyValue, ALGO); return key; } }