Aes
Provides symetric encrypt and decrypt via AES.
Static Method Summary
| Static Public Methods | ||
| public static | 
       decrypt_with_checksum(private_key: *, public_key: *, nonce: *, message: *, legacy: boolean): Buffer  | 
    |
| public static | 
       encrypt_with_checksum(private_key: *, public_key: *, nonce: *, message: *): Buffer Identical to decrypt_with_checksum but used to encrypt.  | 
    |
| public static | 
       fromBuffer(buf: *): *  | 
    |
| public static | 
       fromSeed(seed: *): *  | 
    |
| public static | 
       fromSha512(hash: *): *  | 
    |
Constructor Summary
| Private Constructor | ||
| private | 
      
       | 
    |
Method Summary
| Public Methods | ||
| public | 
       clear(): * This is an excellent way to ensure that all references to Aes can not operate anymore (example: a wallet becomes locked).  | 
    |
| public | 
       decrypt(ciphertext: *): Buffer This method does not use a checksum, the returned data must be validated some other way.  | 
    |
| public | 
       decryptHex(cipher: *): string This method does not use a checksum, the returned data must be validated some other way.  | 
    |
| public | 
       decryptHexToBuffer(cipher: *): Buffer This method does not use a checksum, the returned data must be validated some other way.  | 
    |
| public | 
       decryptHexToText(cipher: *, encoding: string): String This method does not use a checksum, the returned data must be validated some other way.  | 
    |
| public | 
       encrypt(plaintext: *): Buffer This method does not use a checksum, the returned data must be validated some other way.  | 
    |
| public | 
       encryptHex(plainhex: *): String This method does not use a checksum, the returned data must be validated some other way.  | 
    |
| public | 
       encryptToHex(plaintext: *): string This method does not use a checksum, the returned data must be validated some other way.  | 
    |
| Private Methods | ||
| private | 
       _decrypt_word_array(cipher: *): *  | 
    |
| private | 
       _encrypt_word_array(plaintext: *): *  | 
    |
Static Public Methods
public static decrypt_with_checksum(private_key: *, public_key: *, nonce: *, message: *, legacy: boolean): Buffer source
Params:
| Name | Type | Attribute | Description | 
| private_key | * | ||
| public_key | * | ||
| nonce | * | ||
| message | * | ||
| legacy | boolean | 
  | 
      
Return:
| Buffer | 
Throw:
"Invalid Key, ..."  | 
      
public static encrypt_with_checksum(private_key: *, public_key: *, nonce: *, message: *): Buffer source
Identical to decrypt_with_checksum but used to encrypt. Should not throw an error.
Params:
| Name | Type | Attribute | Description | 
| private_key | * | ||
| public_key | * | ||
| nonce | * | ||
| message | * | 
Return:
| Buffer | message - Encrypted message which includes a checksum  | 
        
Private Constructors
private constructor() source
Public Methods
public clear(): * source
This is an excellent way to ensure that all references to Aes can not operate anymore (example: a wallet becomes locked).  An application should ensure there is only one Aes object instance for a given secret seed.
Return:
| * | 
public decrypt(ciphertext: *): Buffer source
This method does not use a checksum, the returned data must be validated some other way.
Params:
| Name | Type | Attribute | Description | 
| ciphertext | * | 
Return:
| Buffer | binary  | 
        
public decryptHex(cipher: *): string source
This method does not use a checksum, the returned data must be validated some other way.
Params:
| Name | Type | Attribute | Description | 
| cipher | * | 
public decryptHexToBuffer(cipher: *): Buffer source
This method does not use a checksum, the returned data must be validated some other way.
Params:
| Name | Type | Attribute | Description | 
| cipher | * | 
Return:
| Buffer | encoded as specified by the parameter  | 
        
public decryptHexToText(cipher: *, encoding: string): String source
This method does not use a checksum, the returned data must be validated some other way.
Params:
| Name | Type | Attribute | Description | 
| cipher | * | ||
| encoding | string | 
  | 
      
public encrypt(plaintext: *): Buffer source
This method does not use a checksum, the returned data must be validated some other way.
Params:
| Name | Type | Attribute | Description | 
| plaintext | * | 
Return:
| Buffer | binary  | 
        
public encryptHex(plainhex: *): String source
This method does not use a checksum, the returned data must be validated some other way.
Params:
| Name | Type | Attribute | Description | 
| plainhex | * | 
public encryptToHex(plaintext: *): string source
This method does not use a checksum, the returned data must be validated some other way.
Params:
| Name | Type | Attribute | Description | 
| plaintext | * | 
Private Methods
private _decrypt_word_array(cipher: *): * source
Params:
| Name | Type | Attribute | Description | 
| cipher | * | 
Return:
| * | 
private _encrypt_word_array(plaintext: *): * source
Params:
| Name | Type | Attribute | Description | 
| plaintext | * | 
Return:
| * | 
    
  