X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/96d19bc96ba1e93fe09561f3ceefe427e7d30386..5dc6132d3a8e6e4048698bf1914b486f9cf41e2c:/sshpubk.c diff --git a/sshpubk.c b/sshpubk.c index 8a9b75df..270e6850 100644 --- a/sshpubk.c +++ b/sshpubk.c @@ -949,30 +949,6 @@ int base64_lines(int datalen) return (datalen + 47) / 48; } -void base64_encode_atom(unsigned char *data, int n, char *out) -{ - static const char base64_chars[] = - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - - unsigned word; - - word = data[0] << 16; - if (n > 1) - word |= data[1] << 8; - if (n > 2) - word |= data[2]; - out[0] = base64_chars[(word >> 18) & 0x3F]; - out[1] = base64_chars[(word >> 12) & 0x3F]; - if (n > 1) - out[2] = base64_chars[(word >> 6) & 0x3F]; - else - out[2] = '='; - if (n > 2) - out[3] = base64_chars[word & 0x3F]; - else - out[3] = '='; -} - void base64_encode(FILE * fp, unsigned char *data, int datalen, int cpl) { int linelen = 0;