org.abora.gold.lock
Class Scrambler

java.lang.Object
  |
  +--org.abora.gold.java.AboraHeaper
        |
        +--org.abora.gold.xpp.basic.Heaper
              |
              +--org.abora.gold.lock.Scrambler
Direct Known Subclasses:
NoScrambler

public class Scrambler
extends Heaper

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 (e.g. 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.


Field Summary
protected static MuTable AllScramblers
           
 
Fields inherited from class org.abora.gold.xpp.basic.Heaper
AllBlasts, BecomeMap, GarbageCount, InGC, InitializedClasses, InitializingClasses, LastMemory, NextClientRequestNumber, NotOneElementSignal, PackageTable, PromiseNameTable, StringHashSBoxes
 
Fields inherited from class org.abora.gold.java.AboraHeaper
ActiveClubs, CurrentAuthor, CurrentBertCanopyCache, CurrentBertCrum, CurrentChunk, CurrentGrandMap, CurrentKeyMaster, CurrentPacker, CurrentSensorCanopyCache, CurrentServer, CurrentSession, CurrentSessions, CurrentTrace, InitialEditClub, InitialOwner, InitialReadClub, InitialSponsor, InsideTransactionFlag
 
Constructor Summary
Scrambler()
           
 
Method Summary
 int actualHashForEqual()
           
static void DEFINE(java.lang.String identifier, Scrambler scrambler)
           
static void initTimeNonInherited()
           
static void linkTimeNonInherited()
           
static Heaper make(UInt8Array identifier)
          Return a scrambler with the given name.
static void remember(Sequence identifier, Scrambler scrambler)
          Register the existence of a particular kind of scrambler.
 UInt8Array scramble(UInt8Array clear)
          Carry out a one-way hash function on the given clear text.
 
Methods inherited from class org.abora.gold.xpp.basic.Heaper
abstractDeclarationFor, abstractTypeFor, addMethodAttributeToInOf, addPackage, addPackageCategory, allClientProtocolOn, argumentTypesFor, arrow, blast, blast, BLAST, cachePromiseNameTable, cachePromiseNameTableIn, canYouBecome, cast, cleanPromiseClasses, cleanupGarbage, clientClassesDo, clientFunctionsOn, clientMethodsOn, clientProtocol, clientProtocolDo, clientProtocolOn, clientProtocolOn, collectibleClasses, compare, compileClientSubclasses, compileConstantPromiseMethods, compileCreateFromRcvr, compileEQ, compileGeneratedClassMethod, compileGeneratedMethod, compileHook, compilePromise, compilePromiseDefaultMethods, compilePromiseFluidDeclarations, compilePromiseHandlers, compilePromiseMethods, compileRequestCreateMsgInArguments, compileRequestEvaluateMsgInReturningArguments, compileRPCSpecialistEvaluateMsgForReturningArguments, compileSendSelfTo, compileSendSelfToSendHook, compileStubbleMethods, compileSubclassStubbleMethods, computeMangle, computePreorder, constantTypeValue, convert, convertCopyDeclarations, convertDeferredDeclarations, convertProxyDeclarations, convertSubclassCopyDeclarations, convertSubclassDeferredDeclarations, convertSubclassProxyDeclarations, copyReferencesToType, create, create, create, create, create, create, create, create, create, create, createRequestClassArguments, definesProxyMethods, delete, deref, destroy, destruct, destructor, enum, enumFlags, equals, exportName, fetchAttribute, fetchPackage, fetchSuperCategory, fileOutClientProtocol, findCategory, findSenderAndReceiverMethods, findTailInto, flushPromiseNameTable, foo, freezeClientClasses, freezeClientProtocol, freezeStProtocol, frozenClasses, garbageCollect, garbageCollectFrom, gcOpportunity, gcOpportunity, generatedCategory, generatePromiseNames, getCategory, getOrMakePackage, getSuperCategory, handlerSignaturesFrom, hash, hashForEqual, hasProxyMethods, info_clientClasses, info_clientSideClasses, info_promiseClasses, info_stProtocol, inGC, initializedClasses, initializingClasses, initPackages, initStringHashSBoxes, inspectPieces, instanceSize, IntegerVar, isByProxy, isConstructed, isDestructed, isEqual, isEqualOrSubclassOf, isGenerated, isIntType, isKindOf, isRawType, isUnlocked, make, makeClassTable, makeFillTable, makeRequestTable, mangle, markChildren, markCount, markInstances, mayBecome, mayBecomeAnySubclassOf, new1, newX, nonCopyVariables, notWorking, pack, packageClasses, packagingCategory, parseExportName, passe, pointerToStaticMember, pointerToStaticMember, pointerToVirtualMember, preorderMax, preorderNumber, printOn, PROBLEM, problems, promiseClass, promiseDefaultValue, promiseName, promiseNameTable, promiseToAbstract, registerPackageCategory, removeGeneratedCode, removeStubbleMethods, removeSubclassGeneratedCode, removeSubclassStubbleMethods, requestProcedure, requestProceduresFrom, returnTypeFor, rootName, scheduleTermination, sendProxyTo, sendSelfTo, serverNameFor, setGC, signal, signals, smalltalkSelector, stClientProtocol, stubbleSelectorTokenReturnsArguments, subclassNonCopyVariables, takeOop, togglePromiseName, togglePromiseOfParse, unimplemented, unmangle, verifyFreeze, wipeStubble
 
Methods inherited from class org.abora.gold.java.AboraHeaper
asOop, basicInspect, displayString, error, hack, halt, inspect, knownBug, mightNotImplement, REQUIRES, shouldImplement, shouldNotImplement, stubbleForSubclassResponsibility, thingToDo, willNotImplement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AllScramblers

protected static MuTable AllScramblers
Constructor Detail

Scrambler

public Scrambler()
Method Detail

scramble

public UInt8Array scramble(UInt8Array clear)
Carry out a one-way hash function on the given clear text.


actualHashForEqual

public int actualHashForEqual()
Overrides:
actualHashForEqual in class Heaper

remember

public static void remember(Sequence identifier,
                            Scrambler scrambler)
Register the existence of a particular kind of scrambler. The identifier must be unique.


make

public static Heaper make(UInt8Array identifier)
Return a scrambler with the given name. Fail with
BLAST(NoSuchScrambler) if there is none.


initTimeNonInherited

public static void initTimeNonInherited()

linkTimeNonInherited

public static void linkTimeNonInherited()

DEFINE

public static void DEFINE(java.lang.String identifier,
                          Scrambler scrambler)


Translation - Copyright © 2003 David G Jones. All Rights Reserved.
Original Udanax-Gold - Copyright © 1979-1999 Udanax.com. All rights reserved.