static KeysetHandle aesGcm128KeyToKeysetHandle(
        byte[] rawAesKey, int keyId, OutputPrefixType outputPrefixType)
        throws GeneralSecurityException {
      if (rawAesKey.length != 16) {
        throw new IllegalArgumentException("unexpected raw key length");
      }
      BytesValue value = BytesValue.of(ByteString.copyFrom(rawAesKey));
      Keyset keyset =
          Keyset.newBuilder()
              .addKey(
                  Keyset.Key.newBuilder()
                      .setStatus(KeyStatusType.ENABLED)
                      .setOutputPrefixType(outputPrefixType)
                      .setKeyId(keyId)
                      .setKeyData(
                          KeyData.newBuilder()
                              .setTypeUrl(TYPE_URL)
                              .setValue(value.toByteString())
                              .setKeyMaterialType(KeyMaterialType.SYMMETRIC)
                              .build())
                      .build())
              .setPrimaryKeyId(keyId)
              .build();
      return TinkProtoKeysetFormat.parseKeyset(keyset.toByteArray(), InsecureSecretKeyAccess.get());
    }
A custom implementation of {@link com.google.crypto.tink.KeyManager} for AES GCM 128.

<p>It only implements the methods of the KeyManager interface that are needed.
java_src/src/test/java/com/google/crypto/tink/custom/CustomAeadKeyManagerTest.java