diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-08-19 19:11:14 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-08-19 19:11:14 +0000 |
commit | 86df429c4559194975b7767266f7426223eb24b5 (patch) | |
tree | 4a2be43d01e33fc0044878456c4dfff74f54d131 | |
parent | 052ff3499454ce63403d0d582d050f2516873e9f (diff) | |
download | gnunet-86df429c4559194975b7767266f7426223eb24b5.tar.gz gnunet-86df429c4559194975b7767266f7426223eb24b5.zip |
-remove more uses of short hash
-rw-r--r-- | doc/man/gnunet-ecc.1 | 5 | ||||
-rw-r--r-- | src/fs/fs_namespace.c | 12 |
2 files changed, 7 insertions, 10 deletions
diff --git a/doc/man/gnunet-ecc.1 b/doc/man/gnunet-ecc.1 index 943f85e0d..35d877efd 100644 --- a/doc/man/gnunet-ecc.1 +++ b/doc/man/gnunet-ecc.1 | |||
@@ -17,14 +17,11 @@ gnunet\-ecc \- manipulate GNUnet ECC key files | |||
17 | Create COUNT public-private key pairs and write them to FILENAME. Used for creating a file for testing. | 17 | Create COUNT public-private key pairs and write them to FILENAME. Used for creating a file for testing. |
18 | .B | 18 | .B |
19 | .IP "\-p, \-\-print-public-key" | 19 | .IP "\-p, \-\-print-public-key" |
20 | Print the corresponding public key to stdout. | 20 | Print the corresponding public key to stdout. This is the value used for PKEY records in GNS. |
21 | .B | 21 | .B |
22 | .IP "\-P, \-\-print-peer-identity" | 22 | .IP "\-P, \-\-print-peer-identity" |
23 | Print the corresponding peer identity (hash of the public key) to stdout. This hash is used for the name of peers. | 23 | Print the corresponding peer identity (hash of the public key) to stdout. This hash is used for the name of peers. |
24 | .B | 24 | .B |
25 | .IP "\-s, \-\-print-short-identity" | ||
26 | Print the corresponding short hash (256-bit hash of the public key) to stdout. This hash is used for names in the zkey zone. | ||
27 | .B | ||
28 | .IP "\-c FILENAME, \-\-config=FILENAME" | 25 | .IP "\-c FILENAME, \-\-config=FILENAME" |
29 | Use the configuration file FILENAME. | 26 | Use the configuration file FILENAME. |
30 | .B | 27 | .B |
diff --git a/src/fs/fs_namespace.c b/src/fs/fs_namespace.c index 2a7af082e..526ebbdfc 100644 --- a/src/fs/fs_namespace.c +++ b/src/fs/fs_namespace.c | |||
@@ -132,8 +132,8 @@ get_update_information_directory (struct GNUNET_FS_Handle *h, | |||
132 | char *dn; | 132 | char *dn; |
133 | char *ret; | 133 | char *ret; |
134 | struct GNUNET_CRYPTO_EccPublicKey pub; | 134 | struct GNUNET_CRYPTO_EccPublicKey pub; |
135 | struct GNUNET_CRYPTO_ShortHashCode hc; | 135 | struct GNUNET_HashCode hc; |
136 | struct GNUNET_CRYPTO_ShortHashAsciiEncoded enc; | 136 | struct GNUNET_CRYPTO_HashAsciiEncoded enc; |
137 | 137 | ||
138 | if (GNUNET_OK != | 138 | if (GNUNET_OK != |
139 | GNUNET_CONFIGURATION_get_value_filename (h->cfg, "FS", "UPDATE_DIR", | 139 | GNUNET_CONFIGURATION_get_value_filename (h->cfg, "FS", "UPDATE_DIR", |
@@ -144,13 +144,13 @@ get_update_information_directory (struct GNUNET_FS_Handle *h, | |||
144 | return NULL; | 144 | return NULL; |
145 | } | 145 | } |
146 | GNUNET_CRYPTO_ecc_key_get_public (ns, &pub); | 146 | GNUNET_CRYPTO_ecc_key_get_public (ns, &pub); |
147 | GNUNET_CRYPTO_short_hash (&pub, sizeof (pub), &hc); | 147 | GNUNET_CRYPTO_hash (&pub, sizeof (pub), &hc); |
148 | GNUNET_CRYPTO_short_hash_to_enc (&hc, | 148 | GNUNET_CRYPTO_hash_to_enc (&hc, |
149 | &enc); | 149 | &enc); |
150 | GNUNET_asprintf (&ret, "%s%s%s", | 150 | GNUNET_asprintf (&ret, "%s%s%s", |
151 | dn, | 151 | dn, |
152 | DIR_SEPARATOR_STR, | 152 | DIR_SEPARATOR_STR, |
153 | (const char *) enc.short_encoding); | 153 | (const char *) enc.encoding); |
154 | GNUNET_free (dn); | 154 | GNUNET_free (dn); |
155 | return ret; | 155 | return ret; |
156 | } | 156 | } |