diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-10-18 10:25:00 -0700 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-09-25 15:08:31 -0400 |
commit | ed48b0fe56df2f719cd7cd274c664f7037f98b75 (patch) | |
tree | 178a5709cb8ad0bd200f8d498168c5affac42d71 /src/common/crypto_curve25519.h | |
parent | c75e275574b7a3496cd5050ef75f8d82d075642e (diff) | |
download | tor-ed48b0fe56df2f719cd7cd274c664f7037f98b75.tar.gz tor-ed48b0fe56df2f719cd7cd274c664f7037f98b75.zip |
Support for writing ed25519 public/private components to disk.
This refactors the "== type:tag ==" code from crypto_curve25519.c
Diffstat (limited to 'src/common/crypto_curve25519.h')
-rw-r--r-- | src/common/crypto_curve25519.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/common/crypto_curve25519.h b/src/common/crypto_curve25519.h index fece2feb19..404f99c18e 100644 --- a/src/common/crypto_curve25519.h +++ b/src/common/crypto_curve25519.h @@ -72,5 +72,17 @@ int curve25519_public_from_base64(curve25519_public_key_t *pkey, int curve25519_public_to_base64(char *output, const curve25519_public_key_t *pkey); +int crypto_write_tagged_contents_to_file(const char *fname, + const char *typestring, + const char *tag, + const uint8_t *data, + size_t datalen); + +ssize_t crypto_read_tagged_contents_from_file(const char *fname, + const char *typestring, + char **tag_out, + uint8_t *data_out, + ssize_t data_out_len); + #endif |