#ifndef SHA_H
#define SHA_H

/*Secure Hashing Algorithm SAM created by Tam Willacy, 14 March 2001
 * Most code is adapted from OpenLDAP source
 */
int create_ssha_base64_digest(char *passwd,char *ret,int ret_sz);
	/*if returns 1, has filled given buffer with the given password 
	digested using SSHA and then base64 encoded.  SSHA is basically SHA with salt.*/

int create_sha_base64_digest(char *passwd,char *ret,int ret_sz); 
	/*if returns 1, has filled given buffer with the given 
	password digested using SHA and then base64 encoded*/

char *get_sha_error(void);/*get error string, not greater than 400 
	chars, and first half is details rather than error. So can call 
	when no error*/

#endif
