@Override
  public Aead createAead(final byte[] symmetricKey) throws GeneralSecurityException {
    if (symmetricKey.length != getKeySizeInBytes()) {
      throw new GeneralSecurityException(
          String.format(
              "Symmetric key has incorrect length; expected %s, but got %s",
              getKeySizeInBytes(), symmetricKey.length));
    }
    return new AesGcmJce(symmetricKey);
  }
An {@link AeadFactory} that creates new instances of AES-GCM from raw keys
java_src/src/main/java/com/google/crypto/tink/aead/subtle/AesGcmFactory.java