diff options
Diffstat (limited to 'src/blob.h')
-rw-r--r-- | src/blob.h | 28 |
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 | |||
10 | typedef struct fido_blob { | ||
11 | unsigned char *ptr; | ||
12 | size_t len; | ||
13 | } fido_blob_t; | ||
14 | |||
15 | typedef struct fido_blob_array { | ||
16 | fido_blob_t *ptr; | ||
17 | size_t len; | ||
18 | } fido_blob_array_t; | ||
19 | |||
20 | cbor_item_t *fido_blob_encode(const fido_blob_t *); | ||
21 | fido_blob_t *fido_blob_new(void); | ||
22 | int fido_blob_decode(const cbor_item_t *, fido_blob_t *); | ||
23 | int fido_blob_is_empty(const fido_blob_t *); | ||
24 | int fido_blob_set(fido_blob_t *, const unsigned char *, size_t); | ||
25 | void fido_blob_free(fido_blob_t **); | ||
26 | void fido_free_blob_array(fido_blob_array_t *); | ||
27 | |||
28 | #endif /* !_BLOB_H */ | ||