Application Programmers Interface Specification |
The Internet Document API will provide all the
services for sending and receiving Internet Documents.
The following page is just a draft of what it could look
like. It will be implemented in Java, C, and Delphi. The implementations may differ slightly, as the languages themselves all have different syntax. Suggestions about how the API should be implemented would be appreciated. Send any comments or ideas to Peter Harrison |
Outline |
The API is split into two functional areas, the Document Interface and the Transport Interface. The Document Interface will be able to manipulate, load, save and verify XML Documents. Essentially the Document Interface will be a implmentation of DOM. The Transport Interface will be used to transfer any kind of data over via email, taking care of issues such as encryption and signing. |
Document Interface |
The Document Interface is actually a lightweight XML
'Parser'. Its not a validating parser, it is just able to
read and write XML documents. Class: TIDXml Properties: XML Node Methods: GetValue( node : String ) : String GetCount( node : String ) : Integer AddNode( node, newnode : String ) AddElement( newnode, value : String ) EditValue( node, value : String ) |
Transport Interface |
The primary strength of the Transport Interface is
the way I plan to handle Public Keys. One of the biggest
problems I see currently is that people need to worry
about how to obtain public keys. With this API, the
details are more hidden. Once you generate your own Key
Pair, and you get the PKServer List, the sending an
receiving of encrypted emails is automatic. Any required
public keys are downloaded for you. GetPKServers(); PrivateKey GeneratePrivateKey(); PublicKey GeneratePublicKey( PrivateKey ); PKAddress SendPublicKey( Name, Email, PublicKey ); PublicKey GetPublicKey( PKAddress | emailAddress ); If an email address is supplied each PKServer is contacted in turn and queried. Naturally using email addresses for Public Key resolution is not the prefered means of obtaining a Public Key due to the huge comms overhead. PS : Any ideas on how we could make email public key resolution faster? PublicKey VerifyPublicKey( PKAddress | emailAddress
); If an email address is supplied each PKServer is contacted in turn and queried. Naturally using email addresses for Public Key resolution is not the prefered means of obtaining a Public Key due to the huge comms overhead. The Verification consists of a MD5 of the Public Key, instead of the Public Key itself. The MD5 is shorter than the Public Key. SetEmailSettings( emailaddress, pop3server,
smtpserver, pop3password ); SendEmailFile( emailaddress, PublicKey, FileName ); SendEmailStream( emailaddress, PublicKey, Stream ); GetEmailHeaders(); GetEMailtoFile( number, Filename ); GetEMailtoStream( number, Stream ); DeleteEmail( number ); |
Odds and Ends |
Further things to think about: |
Home |