Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mRemoteNG/PuTTYNG.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/ssh.h
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2022-04-22 13:22:56 +0300
committerSimon Tatham <anakin@pobox.com>2022-04-25 16:10:16 +0300
commit043c24844a45a209697383e6847f35872232a287 (patch)
tree0f61255d46d6990a7912e10aebe3a60fbe53b529 /ssh.h
parent1bd2af1f875b8c7927906eadaf578013df8d999f (diff)
Improve the base64 utility functions.
The low-level functions to handle a single atom of base64 at a time have been in 'utils' / misc.h for ages, but the higher-level family of base64_encode functions that handle a whole data block were hidden away in sshpubk.c, and there was no higher-level decode function at all. Now moved both into 'utils' modules and declared them in misc.h rather than ssh.h. Also, improved the APIs: they all take ptrlen in place of separate data and length arguments, their naming is more consistent and more explicit (the previous base64_encode which didn't name its destination is now base64_encode_fp), and the encode functions now accept cpl == 0 as a special case meaning that the output base64 data is wanted in the form of an unbroken single-line string with no trailing \n.
Diffstat (limited to 'ssh.h')
-rw-r--r--ssh.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/ssh.h b/ssh.h
index b703945f..3465c196 100644
--- a/ssh.h
+++ b/ssh.h
@@ -1290,11 +1290,7 @@ static inline bool is_base64_char(char c)
c == '+' || c == '/' || c == '=');
}
-extern int base64_decode_atom(const char *atom, unsigned char *out);
extern int base64_lines(int datalen);
-extern void base64_encode_atom(const unsigned char *data, int n, char *out);
-extern void base64_encode(FILE *fp, const unsigned char *data, int datalen,
- int cpl);
/* ppk_load_* can return this as an error */
extern ssh2_userkey ssh2_wrong_passphrase;