|  | 
 | ||||
|        | |||||
|  | ||||||
| Other Library Functions | ||||||
| OMX | blowfish.state | 
| Library: Blowfish (OMBLOWFISH) Import: omblowfish.xmd | 
The state OMX component carries state information between calls to the
functions of the OMBLOWFISH library. A state also contains information
about the encryption key being used to encrypt or decrypt the data.
Within your program, you can create as many instances of the stateOMX
component as you require. A instance of the state OMX component can be
declared as a global, local, or even passed as an argument to a
function.
A particular instance of statemust be initialized using
blowfish.set-encryption-key before being used.
Please refer to OMX Components for a general description of OMX components and how they are used.
The state OMX component is central to the OMBLOWFISH library, and is
used by all of its functions.
blowfish.decode is an external function that takes a 64-bit quantity and a
     state, and returns the decrypted value as a 64-bit quantity,
     encased as a string.
   
blowfish.encode is an external function that takes a 64-bit quantity and a
     state, and returns the encrypted value as a 64-bit quantity,
     encased as a string
   
blowfish.set-encryption-key takes an encryption key as a string and a
    state, and initializes the state using the encryption key.
Once you have declared an instance of blowfish.state, you must initialize it
using blowfish.set-encryption-key.
     import "omblowfish.xmd" prefixed by blowfish.
  
  
     process
        local blowfish.state state
  
        set-encryption-key ("ENCRYPTION KEY", state)
The OMBLOWFISH library exports a conversion function from string to
state that can be used to write this example more concisely:
     import "omblowfish.xmd" prefixed by blowfish.
  
  
     process
        local blowfish.state state initial { "ENCRYPTION KEY" }
| Other Library Functions blowfish.decode blowfish.encode blowfish.set-encryption-key blowfish.state | 
Copyright © Stilo International plc, 1988-2008.