DownloadSoftware and Source Code!

Open SourceOpen Source has made my life easier.
Here's where I give something back.

Septicus Software Source Code

This is where you can find the source code and frameworks which everyone is welcome to use. The source code here is available under a BSD style license. You are free to use it in commercial applications, modify it all you like and never tell anyone. It is hoped that any improvements will be shared with others, and you are encouraged to do so. There is no source control set up on this server, but any changes to this code base will be released here. If you wish to add changes please email them to me and I will be happy to add them into the base distribution (provided there are no issues with the additions). These frame works are distributed in a directory with Xcode project files and source code. You will need have the latest Apple Developer Tools installed to build them. They are all written in Objective-C.


SSCrypto.framework

Ever wanted to add OpenSSL encryption and decryption to your Cocoa application? Or maybe you just want to do checksums like SHA1 or MD5? Or maybe you want to do both? Maybe you just think the OpenSSL library is kinda ugly to use and wish you had a nice simple open source wrapper around all that? One that can easily be used in commercial software? Well, aren't you lucky?

There is now a public (read only) subversion repository available here: http://www.septicus.com/SSCrypto/trunk/
Check out the latest source like so:

svn co http://www.septicus.com/SSCrypto/trunk/ ./SSCrypto

SSCrypto.framework provides a simple wrapper around OpenSSL library functions for encryption, decryption (both symmetric and RSA) and checksums. It also encodes and decodes base64 data and can generate both private and public RSA keys. A test tool is included in the project. Click here to see the main.m file that comes with SSCrypto for examples of it's use.

Template.framework

Template.framework provides a simple Template object for use with parsing template files. It uses only Foundation classes and can be used with command line tools. It is currently used by StartupItem Manager to create the property list and shell scripts used in the StartupItems it creates. An example of it's use is this:

NSString *buf;
Template *template;
	
...

template = [[Template alloc] initWithContentsOfFile:templatePath];
buf = [template parseTemplate:tokens];
The template file might look like this:
#!/bin/sh
	
. /etc/rc.common
	
if [ "${<bigAppName>:=-NO-}" = "-YES-" ]; then
   ConsoleMessage "Starting <baseAppName>"
	
   <appName> <args> &
fi

The tokens here would be <bigAppName>, <baseAppName>, <appName>, and <args>. This shows how the Template object is initialized with the contents of a template file. The method, - (NSString *)parseTemplate:(NSDictionary *)tokens, takes an NSDictionary and uses it to find the keys and replace them with the coresponding values. It returns the parsed template as an NSString. It is very simple and easy to use.

Authorization.framework

This is a simple Objective-C wrapper around Apple's Security framework. It provides an Authorization object which can be used to authenticate users and run tools with privileges. It is simply a convinience class. I didn't like having all those Security framework calls all over the place in my code and came up with this to clean things up and make using the Security framework features easier. Here is an example of this class in use:

Authorization *authObj;

...

authObj = [[Authorization alloc] initWithToolPath:toolPath];

// check the users authorization...
authorized = [authObj authenticate];

if (authorized){
   err = [authObj runAuthenticated:arg];
} else {
	NSBeep();
	NSRunCriticalAlertPanel(@"Sorry!",
	                        @"You are not authorized!",
 	                       nil, nil, nil);
	[authObj clearAuthRef];
	[authObj release];
    return;
}

[authObj clearAuthRef];
[authObj release];

Here the NSString, toolPath, would be the path to a tool to be run as a privileged user. The object can be used to just authenticate a user as well. Again, it is just a convinience class.