Java Key Pair Create generateKeyAES()

Here you can find the source of generateKeyAES()

Description

generate Key AES

License

Open Source License

Declaration

private static Key generateKeyAES() 

Method Source Code

//package com.java2s;
/**//  ww  w  .j  a v  a2 s  .  com
 * Copyright (C) 2013 Company. All Rights Reserved. 
 * 
 * This software is the proprietary information of Company . 
 * Use is subjected to license terms. 
 *
 * @since Jul 14, 2013 8:27:33 PM
 * @author SPA
    
 *
 */

import java.security.Key;

import javax.crypto.spec.SecretKeySpec;

public class Main {
    private static final String AES_ALGO = "AES";
    private static final byte[] KEY_VALUE_128_BIT = new byte[] { 'T', 'h', 'e', 'B', 'e', 's', 't', 'S', 'e', 'c',
            'r', 'e', 't', 'K', 'e', 'y' };

    private static Key generateKeyAES() {
        return new SecretKeySpec(KEY_VALUE_128_BIT, AES_ALGO);
    }
}

Related

  1. generateKey(String publicKeyFilename, String privateKeyFilename, String password)
  2. generateKey(String secretKey)
  3. generateKey(String seed)
  4. generateKey(String type)
  5. generateKey(String userKey, String masterKey)
  6. generateKeyDigest(int keyLength, String password)
  7. generateKeyFromString(final String secKey, String algorithm)
  8. generateKeyPair()
  9. generateKeyPair()