XmakeNewSID(), XremoveSID(), XcreateFID(), XremoveFID() – create/delete cryptographic SIDs & FIDs.
More...
#include "Xsocket.h"
| int XcreateFID |
( |
char * |
fid, |
|
|
int |
len |
|
) |
| |
Returns a text string containing a FID made from the a 160 bit cryptographic hash from a newly created public/private keypair in the form of FID:nnnnn.....
The new FID is also registered in the local routing table so that destination DAGs using the FID will be handled locally.
- Parameters
-
| fid | a buffer to receive the newly created FID. |
| len | the length of fid. If less then 45 characters an error will be returned. |
- Returns
- 0 on success
-
-1 on error with errno set
| int XexistsSID |
( |
const char * |
sid | ) |
|
- Parameters
-
| sid | Session Identifier whose keys we are looking for |
- Returns
- 1 if keys corresponding to SID are available.
-
0 if the keys for the given SID are not found.
| int XmakeNewSID |
( |
char * |
randomSID, |
|
|
int |
randomSIDlen |
|
) |
| |
Create a new session identifier that an application can use to uniquely identify itself in XIA.
- Parameters
-
| randomSID | a buffer to return the newly generated SID |
| randomSIDlen | length of randomSID buffer |
- Returns
- 0 on success
-
-1 on failure
| int XremoveFID |
( |
const char * |
fid | ) |
|
Remove the FID from the local routing table and delete the associated keypair.
- Parameters
-
- Returns
- 0 on success
-
-1 on error
| int XremoveSID |
( |
const char * |
sid | ) |
|
An SID is a hash of the public key preceded by the string "SID:". We remove the key files associated with the given SID.
- Parameters
-
| sid | string representing the SID |
- Returns
- 0 on successful deletion of key-pair files associated with sid
-
-1 on failure