Hash
Hash input.
const input = Input.create('myInput: hash', {size: 64});
input.setValue('b542f74248124c32');
Property Summary
| Property Name | Description | Defined by Default | Default Value | 
|---|---|---|---|
| size | bit size of the hash. This property needs to be defined at constructor time | ![]()  | 
![]()  | 
All properties including the inherited ones can be listed via registeredPropertyNames
Method Summary
| Public Methods | ||
| public | 
      
       Generates a new random hash and assigns it to the value of the input.  | 
    |
| Protected Methods | ||
| protected | 
       _validation(at: null | number): Promise<*> Implements input's validations  | 
    |
Inherited Summary
| From class Input | ||
| public static | 
      
       Creates an input instance.  | 
    |
| public static | 
      
       Registers a new input type to the available inputs  | 
    |
| public static | 
       registerProperty(inputClassOrRegisteredName: string | Input, name: string, initialValue: *) Registers a property for the input type (also available as   | 
    |
| public static | 
       registeredInput(name: string): Input Returns the input type based on the registration name  | 
    |
| public static | 
      
       Returns a list containing the names of the registered input types  | 
    |
| public static | 
       registeredPropertyNames(inputClassOrRegisteredName: string | Input): Array<string> Returns a list about all registered property names including the inherited ones for the input type  | 
    |
| protected static | 
       _decodeScalar(value: string): * Decodes the input value from the string representation (Input._encodeScalar) to the data type of the input.  | 
    |
| protected static | 
       _decodeVector(value: string): * Decodes a vector value from the string representation ({Input._encodeScalar & Input._encodeVector) to the data type of the input.  | 
    |
| protected static | 
       _encodeScalar(value: *): string Encodes the input value to a string representation that can be later decoded through Input._decode.  | 
    |
| protected static | 
       _encodeVector(values: Array<string>): string Encodes a vector value to a string representation that can be later decoded through Input._decodeVector.  | 
    |
| public | 
       assignProperty(name: string, value: *, loose: boolean) Sets a property to the input.  | 
    |
| public | 
      
       Returns the cache used by the input  | 
    |
| public | 
      
       Forces to flush the internal input cache  | 
    |
| public | 
       hasProperty(name: string): boolean Returns a boolean telling if the input property name is assigned to the input  | 
    |
| public | 
      
       Returns if the value of the input is empty.  | 
    |
| public | 
       isPropertyLocked(name: string): boolean Returns a boolean telling if the property is locked (Input.lockProperty)  | 
    |
| public | 
      
       Returns if the value of the input is required.  | 
    |
| public | 
      
       Returns if the input is serializable  | 
    |
| public | 
      
       Returns if the value of the input is a vector.  | 
    |
| public | 
       lockProperty(name: string, lock: boolean) Prevents a property value to be modified by Input.assignProperty  | 
    |
| public | 
      
       Returns the name of the input which is defined at construction time (inputs cannot be renamed)  | 
    |
| public | 
       parseValue(value: string, assignValue: boolean): * Decodes a value represented as string to the type that is compatible with the input.  | 
    |
| public | 
      
       Returns the property value for the input property name  | 
    |
| public | 
       propertyNames(): Array<string> Returns a list containing the property names assigned to the input  | 
    |
| public | 
      
       Returns a boolean telling if the input is in read-only mode.  | 
    |
| public | 
       async serializeValue(): Promise<string> This method should return a string representation about the current value in a way that can be recovered later through parseValue.  | 
    |
| public | 
       setReadOnly(enable: boolean) Changes the read-only state of the input.  | 
    |
| public | 
       setValue(value: *) Sets the value of the input  | 
    |
| public | 
      
       Sets the input value by avoiding the overhead that may occur when the same value is used across actions that have the input type, therefore this method avoids the re-computation by copying the caches and value associated with the source input to the current input.  | 
    |
| public | 
      
       Executes the input validations (_validation), in case of a failed validation then an exception of type ValidationFail is raised  | 
    |
| public | 
       value(): * Returns the value of the input  | 
    |
| public | 
      
       This method enforces the context of the value being queried.  | 
    |
| protected | 
       _getFromCache(name: string, at: null | number): * Auxiliary method used internally by the input implementations to get a value from the cache  | 
    |
| protected | 
      
       Auxiliary method used internally by input implementations to check if the key is under the cache  | 
    |
| protected | 
       _setToCache(name: string, value: *, at: null | number) Auxiliary method used internally by input implementations to set a value to the cache  | 
    |
| protected | 
       async _validation(at: null | number): Promise<*> Use this method to implement generic validations for your input implementation.  | 
    |
| From class BaseText | ||
| protected static | 
       _decodeVector(value: string): * Decodes a vector value from the string representation (Input._encodeVector) to the data type of the input.  | 
    |
| protected static | 
       _encodeVector(values: Array<string>): string Encodes a vector value to a string representation that can be later decoded through Input._decodeVector.  | 
    |
| public | 
      
       Returns if the input is empty  | 
    |
| protected | 
       _validation(at: null | number): Promise<*> Implements input's validations  | 
    |
| From class Hex | ||
| public | 
      
       Returns the current value in decimal  | 
    |
| public | 
       setValueFromDecimal(value: number) Sets the current value from a decimal number  | 
    |
| protected | 
       _validation(at: null | number): Promise<*> Implements input's validations  | 
    |
    
  
