Index - All Packages - All Categories - All Classes

Class Encrypter

An Encrypter is an instantiation of some public-key encryption algorithm, along with optional public and private keys. Each subclass implements a particular algorithm, such as Rivest-Shamir-Adelman, in response to the encryption, decryption, and key generation protocol.

** obsolete documentation **

The algorithm is identified by a Sequence naming it. Each concrete subclass must register itself during initialization time. This is handled by two macros, DECLARE_ENCRYPTER and DEFINE_ENCRYPTER. DECLARE_ENCRYPTER(AClassName) defines a function that can be used to create an instance. DEFINE_ENCRYPTER("identifier",AClassName) creates an EncrypterMaker parametrized with that "constructor" function pointer, and stores it in the system-wide table of EncrypterMakers. DECLARE_ENCRYPTER should be invoked in function scope (ie. inside a linkTimeNonInherited class method) and DEFINE_ENCRYPTER should be invoked inside an Initializer (ie. inside an initTimeNonInherited class method).

The pseudo-constructor to make an Encrypter takes the PackOBits identifying the algorithm, and looks for a corresponding EncrypterMaker in the table. It then asks that EncrypterMaker to create an instance, with the given public and private keys.

Encrypters are mutable objects. This allows you to create an Encrypter, generate new random keys for it, make a copy, remove its private key, and pass that out for public use.

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

Class Methods

DECLAREU_ENCRYPTER: className

Only applies in C++

DEFINEU_ENCRYPTER: identifier with: className


initTimeNonInherited



Overridden by: NoEncrypter class

invokeFunction: publicKey with: privateKey

In Smalltalk, the Encrypter class is used in place of the function pointer.

linkTimeNonInherited



Overridden by: NoEncrypter class

make: identifier


make: identifier with: publicKey



Overridden by: NoEncrypter class

make: identifier with: publicKey with: privateKey


remember: identifier with: constructor



Instance Methods

actualHashForEqual


create: publicKey with: privateKey



Overridden by: NoEncrypter

decrypt: encrypted

Decrypt data with the current private key.

Overridden by: NoEncrypter

encrypt: clear

Encrypt the given data with the current public key.

Overridden by: NoEncrypter

isEqual: other


privateKey


publicKey


randomizeKeys: seed

Generate a new pair of public and private keys using the given data as a random seed.

Overridden by: NoEncrypter

setPrivateKey: newKey

Change the private key.

setPublicKey: newKey

Change the public key.


Index - All Packages - All Categories - All Classes