test_class.file: core/src/test/java/io/keen/client/java/ScopedKeysTest.java
test_class.identifier: ScopedKeysTest
test_case.body: @Test
      public void testSampleCode() {
          String apiKey = "YOUR_API_KEY_HERE";
  
          //Filters to apply to the key
          Map<String, Object> filter = new HashMap<String, Object>();
          List<Map<String, Object>> filters = new ArrayList<Map<String, Object>>();
  
          //Create and add a filter
          filter.put("property_name", "user_id");
          filter.put("operator", "eq");
          filter.put("property_value", "123");
  
          filters.add(filter);
  
          // create the options we'll use
          Map<String, Object> options = new HashMap<String, Object>();
          options.put("allowed_operations", Arrays.asList("write"));
          options.put("filters", filters);
  
          // do the encryption
          String scopedKey = ScopedKeys.encrypt(apiKey, options);
      }
test_case.class_method_signature: ScopedKeysTest.testSampleCode()
test_case.full_signature: @Test public void testSampleCode()
test_case.identifier: testSampleCode
test_case.invocations: put put put add put asList put encrypt
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSampleCode()
focal_class.declarator: BLOCK_SIZE = 32
focal_class.modifier: private static final
focal_class.original_string: private static final int BLOCK_SIZE = 32;
focal_class.type: int
focal_class.var_name: BLOCK_SIZE
focal_class.file: core/src/main/java/io/keen/client/java/ScopedKeys.java
focal_class.identifier: ScopedKeys
focal_class.class_method_signature: ScopedKeys.encrypt(String apiKey, Map<String, Object> options)
focal_class.full_signature: public static String encrypt(String apiKey, Map<String, Object> options)
focal_class.identifier: encrypt
focal_class.modifiers: public static
focal_class.parameters: (String apiKey, Map<String, Object> options)
focal_class.return: String
focal_class.signature: String encrypt(String apiKey, Map<String, Object> options)
focal_class.class_method_signature: ScopedKeys.encrypt(KeenClient client, String apiKey, Map<String, Object> options)
focal_class.full_signature: public static String encrypt(KeenClient client, String apiKey, Map<String, Object> options)
focal_class.identifier: encrypt
focal_class.modifiers: public static
focal_class.parameters: (KeenClient client, String apiKey, Map<String, Object> options)
focal_class.return: String
focal_class.signature: String encrypt(KeenClient client, String apiKey, Map<String, Object> options)
focal_class.class_method_signature: ScopedKeys.encrypt32CharacterKey(KeenClient client, String apiKey, Map<String, Object> options)
focal_class.full_signature: public static String encrypt32CharacterKey(KeenClient client, String apiKey, Map<String, Object> options)
focal_class.identifier: encrypt32CharacterKey
focal_class.modifiers: public static
focal_class.parameters: (KeenClient client, String apiKey, Map<String, Object> options)
focal_class.return: String
focal_class.signature: String encrypt32CharacterKey(KeenClient client, String apiKey, Map<String, Object> options)
focal_class.class_method_signature: ScopedKeys.decrypt(String apiKey, String scopedKey)
focal_class.full_signature: public static Map<String, Object> decrypt(String apiKey, String scopedKey)
focal_class.identifier: decrypt
focal_class.modifiers: public static
focal_class.parameters: (String apiKey, String scopedKey)
focal_class.return: Map<String, Object>
focal_class.signature: Map<String, Object> decrypt(String apiKey, String scopedKey)
focal_class.class_method_signature: ScopedKeys.decrypt(KeenClient client, String apiKey, String scopedKey)
focal_class.full_signature: public static Map<String, Object> decrypt(KeenClient client, String apiKey, String scopedKey)
focal_class.identifier: decrypt
focal_class.modifiers: public static
focal_class.parameters: (KeenClient client, String apiKey, String scopedKey)
focal_class.return: Map<String, Object>
focal_class.signature: Map<String, Object> decrypt(KeenClient client, String apiKey, String scopedKey)
focal_class.class_method_signature: ScopedKeys.decrypt32CharacterKey(KeenClient client, String apiKey, String scopedKey)
focal_class.full_signature: public static Map<String, Object> decrypt32CharacterKey(KeenClient client, String apiKey, String scopedKey)
focal_class.identifier: decrypt32CharacterKey
focal_class.modifiers: public static
focal_class.parameters: (KeenClient client, String apiKey, String scopedKey)
focal_class.return: Map<String, Object>
focal_class.signature: Map<String, Object> decrypt32CharacterKey(KeenClient client, String apiKey, String scopedKey)
focal_class.class_method_signature: ScopedKeys.padApiKey(String apiKey)
focal_class.full_signature: private static String padApiKey(String apiKey)
focal_class.identifier: padApiKey
focal_class.modifiers: private static
focal_class.parameters: (String apiKey)
focal_class.return: String
focal_class.signature: String padApiKey(String apiKey)
focal_class.class_method_signature: ScopedKeys.pad(String input)
focal_class.full_signature: private static String pad(String input)
focal_class.identifier: pad
focal_class.modifiers: private static
focal_class.parameters: (String input)
focal_class.return: String
focal_class.signature: String pad(String input)
focal_method.body: public static String encrypt(String apiKey, Map<String, Object> options)
              throws ScopedKeyException {
          if (apiKey.length() == 64) {
              return encrypt(KeenClient.client(), apiKey, options);
          } else {
              return encrypt32CharacterKey(KeenClient.client(), apiKey, options);
          }
      }
focal_method.class_method_signature: ScopedKeys.encrypt(String apiKey, Map<String, Object> options)
focal_method.full_signature: public static String encrypt(String apiKey, Map<String, Object> options)
focal_method.identifier: encrypt
focal_method.invocations: length encrypt client encrypt32CharacterKey client
focal_method.modifiers: public static
focal_method.parameters: (String apiKey, Map<String, Object> options)
focal_method.return: String
focal_method.signature: String encrypt(String apiKey, Map<String, Object> options)