From 39f47493d8921917325b07e5db676f885ee0002e Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Sun, 17 Nov 1996 07:27:40 +0000 Subject: [PATCH] (otp_print_stddict_extended, otp_print_hex_extended): New functions. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1019 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/otp/otp.h | 2 ++ lib/otp/otp_print.c | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/lib/otp/otp.h b/lib/otp/otp.h index bd5bbfb5c..8c49bc7be 100644 --- a/lib/otp/otp.h +++ b/lib/otp/otp.h @@ -79,6 +79,8 @@ typedef struct { OtpAlgorithm *otp_find_alg (char *name); void otp_print_stddict (OtpKey key, char *str); void otp_print_hex (OtpKey key, char *str); +void otp_print_stddict_extended (OtpKey key, char *str); +void otp_print_hex_extended (OtpKey key, char *str); unsigned otp_checksum (OtpKey key); int otp_parse_hex (OtpKey key, char *); int otp_parse_stddict (OtpKey key, char *); diff --git a/lib/otp/otp_print.c b/lib/otp/otp_print.c index e625a0a52..f48abddf1 100644 --- a/lib/otp/otp_print.c +++ b/lib/otp/otp_print.c @@ -352,3 +352,17 @@ otp_print_hex (OtpKey key, char *str) key[0], key[1], key[2], key[3], key[4], key[5], key[6], key[7]); } + +void +otp_print_hex_extended (OtpKey key, char *str) +{ + strcpy (str, OTP_HEXPREFIX); + otp_print_hex (key, str + strlen(OTP_HEXPREFIX)); +} + +void +otp_print_stddict_extended (OtpKey key, char *str) +{ + strcpy (str, OTP_WORDPREFIX); + otp_print_stddict (key, str + strlen(OTP_WORDPREFIX)); +}