summaryrefslogtreecommitdiff
path: root/src/blob.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/blob.h')
-rw-r--r--src/blob.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/blob.h b/src/blob.h
new file mode 100644
index 0000000..24fdc23
--- /dev/null
+++ b/src/blob.h
@@ -0,0 +1,28 @@
1/*
2 * Copyright (c) 2018 Yubico AB. All rights reserved.
3 * Use of this source code is governed by a BSD-style
4 * license that can be found in the LICENSE file.
5 */
6
7#ifndef _BLOB_H
8#define _BLOB_H
9
10typedef struct fido_blob {
11 unsigned char *ptr;
12 size_t len;
13} fido_blob_t;
14
15typedef struct fido_blob_array {
16 fido_blob_t *ptr;
17 size_t len;
18} fido_blob_array_t;
19
20cbor_item_t *fido_blob_encode(const fido_blob_t *);
21fido_blob_t *fido_blob_new(void);
22int fido_blob_decode(const cbor_item_t *, fido_blob_t *);
23int fido_blob_is_empty(const fido_blob_t *);
24int fido_blob_set(fido_blob_t *, const unsigned char *, size_t);
25void fido_blob_free(fido_blob_t **);
26void fido_free_blob_array(fido_blob_array_t *);
27
28#endif /* !_BLOB_H */