Home

Interface for Hashing classes

The following code is the interface that I have created for a series of classes that I am creating that will deal with getting the hash of a particular string or file. ''' Hashing interface from Satal Keto's library ''' https://samjenkins.com ''' Version 1.0.0.1 ''' Namespace Security.Hash Public Interface IHasher         Function hashOfStr...

Read more

Calculate MD5 hash of string or file

This class implements the IHasher interface that you can find here. ''' ''' MD5 Hash class from Satal Keto's library ''' https://samjenkins.com ''' Version 1.0.0.1 ''' Imports System.IO Imports System.Security.Cryptography Namespace Security.Hash     Public Class MD5Hasher         Implements IHasher         Public Function hashOfFile(ByVal file...

Read more

Change the cursor in JavaScript

Just a simple JavaScript function to change the cursor /** * Posible options * * auto * crosshair * default * pointer (hand) * help * move * text * wait * e-resize, w-resize, n-resize, s-resize, ne-resize, nw-resize, se-resize, sw-resize * * onmouseover="changeCursor('crosshair');" */ function changeCursor(style) { document....

Read more

Generate a random string in PHP

I created this class primarily to generate random salts for passwords, but it can be used quite easily to create random strings of any length that you specify. <?php /** * clsSalt * * @package * @author Satal Keto * @copyright 2008 * @version v1.00.002 * @access public */ class clsSalt { ...

Read more

Sending an email in PHP

This class was written to allow for me to send an email from PHP easily. The class allows for the message to be sent as either plain text or HTML. <?php /** * clsEmail * * @package * @author Satal Keto * @copyright 2008 * @version v1.00.001 * @access public */ class clsEmail { ...

Read more

Hashing with a salt in PHP

Heres a class I wrote a long time ago to come up with a simple way of ensuring that I used a common method for hashing passwords with salts in a particular way. <?php /** * clsHash * * @package * @author Satal Keto * @copyright 2008 * @version v1.00.001 * @access public */ class clsHash ...

Read more

How to mark method as obsolete

While working on my upcoming library, I was adding some old code that I had created and realised that the way I had done one of the methods wasn’t appropriate. While as this is during the writing of version 1 of my framework I thought rather than to just change the code and forget about all backwards compatibility, I would make the old method ob...

Read more

Track number of times a file is downloaded

Being able to track how many times a file has been downloaded from your website is a useful bit of information. One method of doing this is by making it so that the user is instead of being sent directly to the file is sent to a web page which then sends the user the file. I haven’t added any code that figures out where the file is stored on th...

Read more