Changeset 643 in openpam for trunk/modules/pam_oath/oath.h


Ignore:
Timestamp:
Mar 5, 2013, 3:24:00 PM (8 years ago)
Author:
Dag-Erling Smørgrav
Message:
  • Add a provisional API for computing the current HOTP or TOTP code.
  • Add a provisional API for matching a user response.
  • Add a provisional API for generating a dummy key. When one of the matching functions recognizes a dummy key, it will go through the motions but never report a match.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/pam_oath/oath.h

    r638 r643  
    102102char *oath_key_to_uri(const struct oath_key *);
    103103
     104#define DUMMY_LABEL     ("oath-dummy-key")
     105#define DUMMY_LABELLEN  (sizeof DUMMY_LABEL)
     106#define DUMMY_KEYLEN    80
     107
     108struct oath_key *oath_dummy_key(enum oath_mode, enum oath_hash, unsigned int);
     109
    104110unsigned int oath_hotp(const uint8_t *, size_t, uint64_t, unsigned int);
     111int oath_hotp_current(struct oath_key *);
     112int oath_hotp_match(struct oath_key *, unsigned int, int);
     113
    105114unsigned int oath_totp(const uint8_t *, size_t, unsigned int);
     115int oath_totp_match(const struct oath_key *, unsigned int, int);
     116unsigned int oath_totp_current(const struct oath_key *);
    106117
    107118#endif
Note: See TracChangeset for help on using the changeset viewer.