-/* Cryptographic operations. */
-#define CRYPTO_BLOCK_SIZE 16 /* 128-bit AES */
-#define CRYPTO_KEY_SIZE 16
-#define CRYPTO_HASH_SIZE 32 /* SHA-256 */
-
-struct BlueSkyCryptKeys {
- uint8_t encryption_key[CRYPTO_KEY_SIZE];
- uint8_t authentication_key[CRYPTO_HASH_SIZE];
-};
-
-void bluesky_crypt_init();
-void bluesky_crypt_hash_key(const char *keystr, uint8_t *out);
-void bluesky_crypt_random_bytes(guchar *buf, gint len);
-BlueSkyRCStr *bluesky_crypt_encrypt(BlueSkyRCStr *in, const uint8_t *key);
-BlueSkyRCStr *bluesky_crypt_decrypt(BlueSkyRCStr *in, const uint8_t *key);
+struct BlueSkyRangeset;
+typedef struct BlueSkyRangeset BlueSkyRangeset;
+typedef struct {
+ uint64_t start, length;
+ gpointer data;
+} BlueSkyRangesetItem;
+
+BlueSkyRangeset *bluesky_rangeset_new();
+void bluesky_rangeset_free(BlueSkyRangeset *rangeset);
+gboolean bluesky_rangeset_insert(BlueSkyRangeset *rangeset,
+ uint64_t start, uint64_t length,
+ gpointer data);
+const BlueSkyRangesetItem *bluesky_rangeset_lookup(BlueSkyRangeset *rangeset,
+ uint64_t offset);
+const BlueSkyRangesetItem *bluesky_rangeset_lookup_next(BlueSkyRangeset *rangeset, uint64_t offset);
+void bluesky_rangeset_get_extents(BlueSkyRangeset *rangeset,
+ uint64_t *start, uint64_t *length);