2000-07-24 13:59 GMT+3 Alexander Kresin <alex@belacy.belgorod.su>

This commit is contained in:
Alexander S.Kresin
2000-07-04 12:36:28 +00:00
parent 3dfd022b33
commit 64f8abb625
2 changed files with 148 additions and 0 deletions

View File

@@ -1,3 +1,7 @@
2000-07-24 13:59 GMT+3 Alexander Kresin <alex@belacy.belgorod.su>
* contrib/rdd_ads/adsfunc.c
* added full set of encryption/decryption functions
2000-07-24 13:59 GMT+3 Alexander Kresin <alex@belacy.belgorod.su>
* include/hbapirdd.h
* uncommented relational methods in functions table

View File

@@ -433,4 +433,148 @@ HB_FUNC( ADSGETRELKEYPOS )
}
else
hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSREFRESHAOF" );
}
HB_FUNC( ADSENABLEENCRYPTION )
{
ADSAREAP pArea;
UNSIGNED32 ulRetVal;
char *pucPassword = hb_parc( 1 );
if( strlen( pucPassword ) == 0 )
{
hb_errRT_DBCMD( EG_ARG, 1014, NULL, "ADSENABLEENCRYPTION" );
return;
}
pArea = (ADSAREAP) hb_rddGetCurrentWorkAreaPointer();
if( pArea )
{
ulRetVal = AdsEnableEncryption( pArea->hTable,pucPassword );
hb_retni( ulRetVal );
}
else
hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, " ADSENABLEENCRYPTION" );
}
HB_FUNC( ADSDISABLEENCRYPTION )
{
ADSAREAP pArea;
UNSIGNED32 ulRetVal;
pArea = (ADSAREAP) hb_rddGetCurrentWorkAreaPointer();
if( pArea )
{
ulRetVal = AdsDisableEncryption( pArea->hTable );
hb_retni( ulRetVal );
}
else
hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, " ADSDISABLEENCRYPTION" );
}
HB_FUNC( ADSENCRYPTTABLE )
{
ADSAREAP pArea;
UNSIGNED32 ulRetVal;
pArea = (ADSAREAP) hb_rddGetCurrentWorkAreaPointer();
if( pArea )
{
ulRetVal = AdsEncryptTable( pArea->hTable );
hb_retni( ulRetVal );
}
else
hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSENCRYPTTABLE" );
}
HB_FUNC( ADSDECRYPTTABLE )
{
ADSAREAP pArea;
UNSIGNED32 ulRetVal;
pArea = (ADSAREAP) hb_rddGetCurrentWorkAreaPointer();
if( pArea )
{
ulRetVal = AdsDecryptTable( pArea->hTable );
hb_retni( ulRetVal );
}
else
hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSDECRYPTTABLE" );
}
HB_FUNC( ADSENCRYPTRECORD )
{
ADSAREAP pArea;
UNSIGNED32 ulRetVal;
pArea = (ADSAREAP) hb_rddGetCurrentWorkAreaPointer();
if( pArea )
{
ulRetVal = AdsEncryptRecord( pArea->hTable );
hb_retni( ulRetVal );
}
else
hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSENCRYPTRECORD" );
}
HB_FUNC( ADSDECRYPTRECORD )
{
ADSAREAP pArea;
UNSIGNED32 ulRetVal;
pArea = (ADSAREAP) hb_rddGetCurrentWorkAreaPointer();
if( pArea )
{
ulRetVal = AdsDecryptRecord( pArea->hTable );
hb_retni( ulRetVal );
}
else
hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSDECRYPTRECORD" );
}
HB_FUNC( ADSISENCRYPTIONENABLED )
{
ADSAREAP pArea;
UNSIGNED32 ulRetVal;
UNSIGNED16 usIsEnabled;
pArea = (ADSAREAP) hb_rddGetCurrentWorkAreaPointer();
if( pArea )
{
AdsIsEncryptionEnabled( pArea->hTable, &usIsEnabled );
hb_retl( usIsEnabled );
}
else
hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, " ADSISENCRYPTIONENABLED" );
}
HB_FUNC( ADSISRECORDENCRYPTED )
{
ADSAREAP pArea;
UNSIGNED32 ulRetVal;
UNSIGNED16 usIsEnabled;
pArea = (ADSAREAP) hb_rddGetCurrentWorkAreaPointer();
if( pArea )
{
AdsIsRecordEncrypted( pArea->hTable, &usIsEnabled );
hb_retl( usIsEnabled );
}
else
hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, " ADSISRECORDENCRYPTED" );
}
HB_FUNC( ADSISTABLEENCRYPTED )
{
ADSAREAP pArea;
UNSIGNED32 ulRetVal;
UNSIGNED16 usIsEnabled;
pArea = (ADSAREAP) hb_rddGetCurrentWorkAreaPointer();
if( pArea )
{
AdsIsTableEncrypted( pArea->hTable, &usIsEnabled );
hb_retl( usIsEnabled );
}
else
hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, " ADSISTABLEENCRYPTED" );
}