Java Key Pair Create generateKey(byte[] keyBytes)

Here you can find the source of generateKey(byte[] keyBytes)

Description

generate Key

License

Apache License

Declaration

private static Key generateKey(byte[] keyBytes) throws Exception 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import javax.crypto.spec.SecretKeySpec;
import java.security.Key;

public class Main {
    private static final String AES = "AES";

    private static Key generateKey(byte[] keyBytes) throws Exception {
        return new SecretKeySpec(keyBytes, AES);
    }//from   w  w  w.j  ava  2  s.  c o m
}

Related

  1. generateKey()
  2. generateKey()
  3. generateKey()
  4. generateKey()
  5. generateKey(byte[] keyBytes)
  6. generateKey(char[] password)
  7. generateKey(final SecureRandom srand)
  8. generateKey(final String password, final byte salt[])
  9. generateKey(SecureRandom sr, int size)