public List deidentifyUnaryRow()

in src/main/java/com/google/cloud/solutions/bqremoteencryptionfn/fns/AesFn.java [95:107]


  public List<String> deidentifyUnaryRow(List<String> rows) throws Exception {
    var encryptCipher = makeCipher(Cipher.ENCRYPT_MODE);

    var encoder = Base64.getEncoder();

    ImmutableList.Builder<String> replies = ImmutableList.builder();

    for (String element : rows) {
      var bytes = element.getBytes(StandardCharsets.UTF_8);
      replies.add(encoder.encodeToString(encryptCipher.doFinal(bytes)));
    }
    return replies.build();
  }