aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_crypto_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-03-04 14:09:57 +0000
committerChristian Grothoff <christian@grothoff.org>2012-03-04 14:09:57 +0000
commit87534f72154e9bc859919afaebbc7321dc4fda87 (patch)
tree4dbc81d20e9ec45992e724133e1dd772b281fb9e /src/include/gnunet_crypto_lib.h
parentfc646798891d075673e2ad8f2011c1e15160b6c1 (diff)
downloadgnunet-87534f72154e9bc859919afaebbc7321dc4fda87.tar.gz
gnunet-87534f72154e9bc859919afaebbc7321dc4fda87.zip
-renaming
Diffstat (limited to 'src/include/gnunet_crypto_lib.h')
-rw-r--r--src/include/gnunet_crypto_lib.h32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h
index 7224e84f8..04b460446 100644
--- a/src/include/gnunet_crypto_lib.h
+++ b/src/include/gnunet_crypto_lib.h
@@ -941,38 +941,6 @@ GNUNET_CRYPTO_rsa_verify (uint32_t purpose,
941void 941void
942GNUNET_CRYPTO_random_disable_entropy_gathering (void); 942GNUNET_CRYPTO_random_disable_entropy_gathering (void);
943 943
944/**
945 * Convert binary data to ASCII encoding. The ASCII encoding is rather
946 * GNUnet specific. It was chosen such that it only uses characters
947 * in [0-9A-V], can be produced without complex arithmetics and uses a
948 * small number of characters. The GNUnet encoding uses 103 characters.
949 * Does not append 0-terminator, but returns a pointer to the place where
950 * it should be placed, if needed.
951 *
952 * @param data data to encode
953 * @param size size of data (in bytes)
954 * @param out buffer to fill
955 * @param out_size size of the buffer. Must be large enough to hold
956 * ((size*8) + (((size*8) % 5) > 0 ? 5 - ((size*8) % 5) : 0)) / 5
957 * @return pointer to the next byte in 'out' or NULL on error.
958 */
959char *
960GNUNET_CRYPTO_data_to_string (unsigned char *data, size_t size,
961 char *out, size_t out_size);
962
963/**
964 * Convert ASCII encoding back to data
965 * out_size must match exactly the size of the data before it was encoded.
966 *
967 * @param enc the encoding
968 * @param enclen number of characters in 'enc' (without 0-terminator, which can be missing)
969 * @param out location where to store the decoded data
970 * @param out_size sizeof the output buffer
971 * @return GNUNET_OK on success, GNUNET_SYSERR if result has the wrong encoding
972 */
973int
974GNUNET_CRYPTO_string_to_data (const char *enc, size_t enclen,
975 unsigned char *out, size_t out_size);
976 944
977#if 0 /* keep Emacsens' auto-indent happy */ 945#if 0 /* keep Emacsens' auto-indent happy */
978{ 946{