diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-08-22 07:49:19 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-08-22 07:49:19 +0000 |
commit | a8c5af00cd450ce1c1bf5b2695e7168c526df071 (patch) | |
tree | a848ced6e20daf19548e5f9d3f8f7b77d1419269 /src/include/gnunet_namestore_service.h | |
parent | 2cb19e37aa832394606af654199881f323f69dc8 (diff) | |
download | gnunet-a8c5af00cd450ce1c1bf5b2695e7168c526df071.tar.gz gnunet-a8c5af00cd450ce1c1bf5b2695e7168c526df071.zip |
-expanding namestore API with pkey <-> zkey conversion functions
Diffstat (limited to 'src/include/gnunet_namestore_service.h')
-rw-r--r-- | src/include/gnunet_namestore_service.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/include/gnunet_namestore_service.h b/src/include/gnunet_namestore_service.h index 1e459a850..759b53581 100644 --- a/src/include/gnunet_namestore_service.h +++ b/src/include/gnunet_namestore_service.h | |||
@@ -613,6 +613,34 @@ GNUNET_NAMESTORE_z2s (const struct GNUNET_CRYPTO_EccPublicKey *z); | |||
613 | 613 | ||
614 | 614 | ||
615 | /** | 615 | /** |
616 | * Convert public key to the respective absolute domain name in the | ||
617 | * ".zkey" pTLD. | ||
618 | * This is one of the very few calls in the entire API that is | ||
619 | * NOT reentrant! | ||
620 | * | ||
621 | * @param pkey a public key with (x,y) on the eliptic curve | ||
622 | * @return string "Y.X.zkey" where X and Y are the coordinates of the public | ||
623 | * key in an encoding suitable for DNS labels. | ||
624 | */ | ||
625 | const char * | ||
626 | GNUNET_NAMESTORE_pkey_to_zkey (const struct GNUNET_CRYPTO_EccPublicKey *pkey); | ||
627 | |||
628 | |||
629 | /** | ||
630 | * Convert an absolute domain name in the ".zkey" pTLD to the | ||
631 | * respective public key. | ||
632 | * | ||
633 | * @param zkey string "Y.X.zkey" where X and Y are the coordinates of the public | ||
634 | * key in an encoding suitable for DNS labels. | ||
635 | * @param pkey set to a public key with (x,y) on the eliptic curve | ||
636 | * @return #GNUNET_SYSERR if @a zkey has the wrong syntax | ||
637 | */ | ||
638 | int | ||
639 | GNUNET_NAMESTORE_zkey_to_pkey (const char *zkey, | ||
640 | struct GNUNET_CRYPTO_EccPublicKey *pkey); | ||
641 | |||
642 | |||
643 | /** | ||
616 | * Calculate the DHT query for a given @a label in a given @a zone. | 644 | * Calculate the DHT query for a given @a label in a given @a zone. |
617 | * | 645 | * |
618 | * @param zone private key of the zone | 646 | * @param zone private key of the zone |