Change token data delimiter to `~`

Token data delimiter was changed to `~` so that there is no possibility
to have a conflict with either user or project name.

Change-Id: Ic6a3c530ab3923322d69ec6fed5d3ae1b25f2e01
Signed-off-by: Jacek Centkowski <geminica.programs@gmail.com>
diff --git a/src/main/java/com/googlesource/gerrit/plugins/lfs/fs/LfsFsRequestAuthorizer.java b/src/main/java/com/googlesource/gerrit/plugins/lfs/fs/LfsFsRequestAuthorizer.java
index 8b67591..b3df46d 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/lfs/fs/LfsFsRequestAuthorizer.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/lfs/fs/LfsFsRequestAuthorizer.java
@@ -68,7 +68,7 @@
       rndm.nextBytes(initVector);
       Cipher cipher = cipher(initVector, Cipher.ENCRYPT_MODE);
       return Base64.encodeBytes(Bytes.concat(initVector,
-          cipher.doFinal(String.format("%s-%s-%s", operation,
+          cipher.doFinal(String.format("%s~%s~%s", operation,
               id.name(), timeout(expirationSeconds))
               .getBytes(StandardCharsets.UTF_8))));
     } catch (GeneralSecurityException e) {
@@ -91,7 +91,7 @@
           cipher.doFinal(Arrays.copyOfRange(bytes, IV_LENGTH, bytes.length)),
           StandardCharsets.UTF_8);
       String oid = id.name();
-      String prefix = String.format("%s-%s-", operation, oid);
+      String prefix = String.format("%s~%s~", operation, oid);
       return data.startsWith(prefix)
           && onTime(data.substring(prefix.length()), operation, oid);
     } catch (GeneralSecurityException e) {