@@ -48,25 +48,6 @@ typedef struct Option_EnabledCallback Option_EnabledCallback;
48
48
49
49
typedef struct Option_FlushCallback Option_FlushCallback;
50
50
51
- typedef struct SecretBuffer {
52
- int64_t len;
53
- uint8_t *data;
54
- } SecretBuffer;
55
-
56
- typedef struct FfiResultList_Entry FfiEntryList;
57
-
58
- typedef struct ArcHandle_FfiEntryList {
59
- const FfiEntryList *_0;
60
- } ArcHandle_FfiEntryList;
61
-
62
- typedef struct ArcHandle_FfiEntryList EntryListHandle;
63
-
64
- typedef struct ArcHandle_LocalKey {
65
- const struct LocalKey *_0;
66
- } ArcHandle_LocalKey;
67
-
68
- typedef struct ArcHandle_LocalKey LocalKeyHandle;
69
-
70
51
/* *
71
52
* ByteBuffer is a struct that represents an array of bytes to be sent over the FFI boundaries.
72
53
* There are several cases when you might want to use this, but the primary one for us
@@ -153,6 +134,25 @@ typedef struct ByteBuffer {
153
134
uint8_t *data;
154
135
} ByteBuffer;
155
136
137
+ typedef struct SecretBuffer {
138
+ int64_t len;
139
+ uint8_t *data;
140
+ } SecretBuffer;
141
+
142
+ typedef struct FfiResultList_Entry FfiEntryList;
143
+
144
+ typedef struct ArcHandle_FfiEntryList {
145
+ const FfiEntryList *_0;
146
+ } ArcHandle_FfiEntryList;
147
+
148
+ typedef struct ArcHandle_FfiEntryList EntryListHandle;
149
+
150
+ typedef struct ArcHandle_LocalKey {
151
+ const struct LocalKey *_0;
152
+ } ArcHandle_LocalKey;
153
+
154
+ typedef struct ArcHandle_LocalKey LocalKeyHandle;
155
+
156
156
typedef struct EncryptedBuffer {
157
157
struct SecretBuffer buffer;
158
158
int64_t tag_pos;
@@ -241,6 +241,18 @@ typedef void (*LogCallback)(const void *context,
241
241
extern " C" {
242
242
#endif // __cplusplus
243
243
244
+ /* *
245
+ * ## Derive password using Argon2
246
+ *
247
+ * If the first provided argument is 1, it will use `PARAMS_INTERACTTIVE` and otherwise it will
248
+ * fallback to `PARAMS_MODERATE`.
249
+ *
250
+ */
251
+ ErrorCode askar_argon2_derive_password (int8_t parameters,
252
+ struct ByteBuffer password,
253
+ struct ByteBuffer salt,
254
+ struct SecretBuffer *out);
255
+
244
256
void askar_buffer_free (struct SecretBuffer buffer);
245
257
246
258
void askar_clear_custom_logger (void );
0 commit comments