Index - All Packages - All Categories - All Classes

Class Scrambler

A Scrambler implements a one-way hash function. It should be one-way, in that it should be difficult to unscramble, and it should be a hash, in that two similar inputs should produce very different outputs. It is furthermore desirable but not essential that the algorithm be cryptographically secure (the only way to unscramble an output is by scrambling all possible inputs and comparing), and one-to-one (two different inputs never produce the same output). Each subclass implements some particular algorithm such as Snefru, in response to the scrambling protocol.

The system maintains a table of all of the known Scramblers, indexed by name (a PackOBits). At initialization time, each concrete subclass should use the DEFINE_SCRAMBLER("identifier",(scramblerExpression)) macro to place an instance in the table at some appropriate identifier. DEFINE_SCRAMBLER must be invoked inside an Initializer (eg. in an initTimeNonInherited method).

MatchLockSmiths store passwords in scrambled form, so that being able to read the LockSmith is not enough to find out the password. They also store the name of the Scrambler used to scramble it, so that trial passwords can be scrambled and compared.

Package: Udanax-Gold
All Superclasses: Object Heaper
Immediate Subclasses: NoScrambler
Protocols: Object
Categories: Xanadu-lock

Class Methods

DEFINEU_SCRAMBLER: identifier with: scrambler


initTimeNonInherited



Overridden by: NoScrambler class

linkTimeNonInherited


make: identifier

Return a scrambler with the given name. Fail with
BLAST(NoSuchScrambler) if there is none.

remember: identifier with: scrambler

Register the existence of a particular kind of scrambler. The identifier must be unique.

Instance Methods

actualHashForEqual



Overridden by: NoScrambler

scramble: clear

Carry out a one-way hash function on the given clear text.

Overridden by: NoScrambler


Index - All Packages - All Categories - All Classes