diff options
author | LRN <lrn1986@gmail.com> | 2013-03-03 01:57:10 +0000 |
---|---|---|
committer | LRN <lrn1986@gmail.com> | 2013-03-03 01:57:10 +0000 |
commit | 058c49560ff702057bd8799c2d21b1fd70cb7134 (patch) | |
tree | a4a1d481f45cac006aa452aef2a451f16d03097a /src/fs/fs_namespace.c | |
parent | 63346db616d6478416ec5686746a7818acf81ed6 (diff) | |
download | gnunet-058c49560ff702057bd8799c2d21b1fd70cb7134.tar.gz gnunet-058c49560ff702057bd8799c2d21b1fd70cb7134.zip |
Implement and use GNUNET_FS_namespace_get_public_key_hash
Diffstat (limited to 'src/fs/fs_namespace.c')
-rw-r--r-- | src/fs/fs_namespace.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/fs/fs_namespace.c b/src/fs/fs_namespace.c index 9781cf6b7..177af7efc 100644 --- a/src/fs/fs_namespace.c +++ b/src/fs/fs_namespace.c | |||
@@ -496,6 +496,25 @@ struct ProcessNamespaceContext | |||
496 | 496 | ||
497 | 497 | ||
498 | /** | 498 | /** |
499 | * Get hash of the public key of a namespace. | ||
500 | * | ||
501 | * @param ns namespace | ||
502 | * @param id buffer to store the key in | ||
503 | * @return GNUNET_OK on success | ||
504 | * GNUNET_SYSERR on failure (contents of id remain intact) | ||
505 | */ | ||
506 | int | ||
507 | GNUNET_FS_namespace_get_public_key_hash (struct GNUNET_FS_Namespace *ns, | ||
508 | struct GNUNET_HashCode *id) | ||
509 | { | ||
510 | if ((NULL == ns) || (NULL == id)) | ||
511 | return GNUNET_SYSERR; | ||
512 | GNUNET_CRYPTO_rsa_get_public_key_hash (ns->key, id); | ||
513 | return GNUNET_OK; | ||
514 | } | ||
515 | |||
516 | |||
517 | /** | ||
499 | * Function called with a filename of a namespace. Reads the key and | 518 | * Function called with a filename of a namespace. Reads the key and |
500 | * calls the callback. | 519 | * calls the callback. |
501 | * | 520 | * |