Here you can find the source of getKey(byte[] keyData)
Parameter | Description |
---|---|
keyData | The key bytes |
public static Key getKey(byte[] keyData)
//package com.java2s; //License from project: Open Source License import java.security.Key; import javax.crypto.spec.SecretKeySpec; public class Main { /**// w ww. j a va 2 s . co m * Instantiates an AES key. * * @param keyData The key bytes * @return An AES key */ public static Key getKey(byte[] keyData) { return new SecretKeySpec(keyData, "AES"); } }