rever.h 889 B

12345678910111213141516171819202122232425262728293031323334
  1. /** BEGIN COPYRIGHT BLOCK
  2. * Copyright 2001 Sun Microsystems, Inc.
  3. * Portions copyright 1999, 2001-2003 Netscape Communications Corporation.
  4. * All rights reserved.
  5. * END COPYRIGHT BLOCK **/
  6. #ifndef _REVER_H
  7. #define _REVER_H
  8. #include "slapi-plugin.h"
  9. #include "nspr.h"
  10. #include "base64.h"
  11. #include "slap.h"
  12. #include "ldaplog.h"
  13. #include <dirlite_strings.h> /* PLUGIN_MAGIC_VENDOR_STR */
  14. #define REVER_SCHEME_NAME "DES"
  15. #define PWD_HASH_PREFIX_START '{'
  16. #define PWD_HASH_PREFIX_END '}'
  17. int rever_cmp( char *userpwd, char *dbpwd );
  18. char *rever_enc( char *pwd );
  19. char *rever_dec( char *pwd );
  20. int rever_init( Slapi_PBlock *pb );
  21. void init_des_plugin();
  22. int encode(char *inPlain, char ** outCipher);
  23. int decode(char *inCipher, char **outPlain);
  24. char *migrateCredentials(char *oldpath, char *newpath, char *oldcred);
  25. typedef char *(*migrate_fn_type)(char *, char *, char *);
  26. #endif