[Top] [Prev] [Next] [Bottom]
[Contents]
SaSetStrEncrypt
Sets the encryption and decryption algorithms used by Sapphire. All state and login information is encrypted/decrypted either with the default Sapphire algorithm or these user defined functions.
#include "SaRnHtml.h"
typedef char* (*SaStrEncrypt) SUTPROTO((char* input));
int SaSetStrEncrypt SUTPROTO((SaStrEncrypt encr, SaStrEncrypt
decr));
Arguments
- encr
- Pointer to an encryption function.
- decr
- Pointer to an decryption function.
Return Values
Returns 0 if both inputs are non-NULL or NULL. Returns -1 if either is NULL, but not the other.
Sets the encryption and decryption algorithms used by Sapphire. All state and login information is encrypted/decrypted either with the default Sapphire algorithm or these user defined functions. Functions must be supplied in pairs. If both inputs are NULL, then Sapphire will use the default encryption. The functions supplied must return malloc'd data. The strings returned by the encryption algorithm must yield HTML compatible strings.
char* MyBadEncryption(char* in)
{
return SaCopyString(in);
}
char* MyBadDecryption(char* in)
{
return SaCopyString(in);
}
SaSetStrEncrypt(MyBadEncryption, MyBadDecryption);
- Note: If you change the encryption, you will also have to change the encryption in the Java client and do matching encryption for the activeX control.
See Also
[Top] [Prev] [Next] [Bottom]
[Contents]
info@bluestone.com
Copyright © 1997, Bluestone. All rights
reserved.