X-Git-Url: https://the.earth.li/gitweb/?a=blobdiff_plain;f=keyarray.h;h=1ac13ba571c68d0190a5aa92bdf44d5e3ea9bbf8;hb=a94e29c9a3763f96b1c773f0818b97e4fd0777b0;hp=e50a030c4ec2dd576d0040ad62e85b54484d9701;hpb=eb94eab34a0893fb5b8f78652f338df85f492a9b;p=onak.git diff --git a/keyarray.h b/keyarray.h index e50a030..1ac13ba 100644 --- a/keyarray.h +++ b/keyarray.h @@ -64,6 +64,18 @@ void array_free(struct keyarray *array); */ bool array_add(struct keyarray *array, struct openpgp_fingerprint *fp); +/** + * @brief Load a file into a keyarray + * @param array Pointer to the key array + * @param file The full path to the file to load + * + * Loads fingerprints from the supplied file into the provided keyarray. Does + * not re-initialise the array so can be called repeatedly to add multiple + * files. The file does not need to be sorted; array_add() is called for each + * key to ensure the array is suitable for binary searching with array_find() + */ +bool array_load(struct keyarray *array, const char *file); + /** * @brief Compare two OpenPGP fingerprints * @param a Fingerprint 1