Added 'crypt' utility and reworked 'sid' implementation.