docs: @Override
      public String encode( String text ) {
          try {
              byte[] hash = SecureHash.getHash(algorithm, text.getBytes());
              String result = Base64.encodeBytes(hash);
              return result.length() < maxLength ? result : result.substring(0, maxLength);
          } catch (NoSuchAlgorithmException e) {
              return text;
          }
      }