Cross Reference: /dovecot/src/lib-otp/otp-parse.h
otp-parse.h revision e9e2d23e1ea5a149a7d8828d2a45b9f2313c3785
45312f52ff3a3d4c137447be4c7556500c2f8bf2Timo Sirainen#ifndef __OTP_PARSE_H__
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen#define __OTP_PARSE_H__
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainenint otp_read_hex(const char *data, const char **endptr, unsigned char *hash);
b19a1420da0618a10edf67c2cfd13c8c8633057aTimo Sirainenint otp_read_words(const char *data, const char **endptr, unsigned char *hash);
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainenint otp_read_new_params(const char *data, const char **endptr,
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen struct otp_state *state);
b19a1420da0618a10edf67c2cfd13c8c8633057aTimo Sirainen
b19a1420da0618a10edf67c2cfd13c8c8633057aTimo Sirainenint otp_parse_response(const char *data, unsigned char *hash, bool hex);
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainenint otp_parse_init_response(const char *data, struct otp_state *new_state,
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen unsigned char *hash, bool hex, const char **error);
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainenint otp_parse_dbentry(const char *text, struct otp_state *state);
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainenconst char *otp_print_dbentry(const struct otp_state *state);
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen#endif /* __OTP_PARSE_H__ */
d5cebe7f98e63d4e2822863ef2faa4971e8b3a5dTimo Sirainen