Reference Source
public class | source

EncryptDecrypt

Static Method Summary

Static Public Methods
public static

decrypt(arg_string: string, arg_key: string, arg_mode: string, arg_iv_length: number): string

Transform to a string without encryption.

public static

encrypt(arg_string: string, arg_key: string, arg_mode: string, arg_iv_length: number): string

Transform to a string with encryption.

public static

key(arg_app_secret: string, arg_num_iterations: number, arg_key_length: number, arg_iv_length: number): string

Generate an encryption key from a secret.

Constructor Summary

Public Constructor
public

constructor(): nothing

Create a EncryptDecrypt instance.

Static Public Methods

public static decrypt(arg_string: string, arg_key: string, arg_mode: string, arg_iv_length: number): string source

Transform to a string without encryption.

Params:

NameTypeAttributeDescription
arg_string string

encrypted string.

arg_key string

encryption key.

arg_mode string

cryptographic mode AES-ECB,AES-CBC,AES-CFB,AES-OFB,AES-CTR,AES-GCM,3DES-ECB,3DES-CBC,DES-ECB,DES-CBC.

arg_iv_length number

iv length.

Return:

string

decrypted string.

public static encrypt(arg_string: string, arg_key: string, arg_mode: string, arg_iv_length: number): string source

Transform to a string with encryption.

Params:

NameTypeAttributeDescription
arg_string string

string to encrypt.

arg_key string

encryotion key.

arg_mode string

cryptographic mode AES-ECB,AES-CBC,AES-CFB,AES-OFB,AES-CTR,AES-GCM,3DES-ECB,3DES-CBC,DES-ECB,DES-CBC.

arg_iv_length number

iv length.

Return:

string

encrypted string.

public static key(arg_app_secret: string, arg_num_iterations: number, arg_key_length: number, arg_iv_length: number): string source

Generate an encryption key from a secret.

Params:

NameTypeAttributeDescription
arg_app_secret string

application cryptographic secret.

arg_num_iterations number

iterations count.

arg_key_length number

key length.

arg_iv_length number

iv length.

Return:

string

encrypted string.

Public Constructors

public constructor(): nothing source

Create a EncryptDecrypt instance.

API:
    ->hash():string - 

Return:

nothing