Reference Source
public class | source

Digest

Static Method Summary

Static Public Methods
public static

hash(arg_string: string, arg_digest_method: string | undefined, arg_encoding_method: string | undefined): string

Hash a string.

public static

md5(arg_string: string, arg_encoding_method: string | undefined): string

Hash a string with MD5.

public static

sha1(arg_string: string, arg_encoding_method: string | undefined): string

Hash a string with SHA1.

public static

sha256(arg_string: string, arg_encoding_method: string | undefined): string

Hash a string with SHA256.

public static

sha384(arg_string: string, arg_encoding_method: string | undefined): string

Hash a string with SHA384.

public static

sha512(arg_string: string, arg_encoding_method: string | undefined): string

Hash a string with SHA512.

Constructor Summary

Public Constructor
public

constructor(): nothing

Create a Digest instance.

Static Public Methods

public static hash(arg_string: string, arg_digest_method: string | undefined, arg_encoding_method: string | undefined): string source

Hash a string.

Params:

NameTypeAttributeDescription
arg_string string

string to hash.

arg_digest_method string | undefined

digest method name (sha1,sha256,sha384,sha512,md5)

arg_encoding_method string | undefined

encoding method name (hex,utf8,utf16,binary,base64,hexstr)

Return:

string

hashed string

public static md5(arg_string: string, arg_encoding_method: string | undefined): string source

Hash a string with MD5.

Params:

NameTypeAttributeDescription
arg_string string

string to hash.

arg_encoding_method string | undefined

encoding (default:hex or utf8,utf16,binary,base64,hexstr)

Return:

string

hashed string

public static sha1(arg_string: string, arg_encoding_method: string | undefined): string source

Hash a string with SHA1.

Params:

NameTypeAttributeDescription
arg_string string

string to hash.

arg_encoding_method string | undefined

encoding (default:hex or utf8,utf16,binary,base64,hexstr)

Return:

string

hashed string

public static sha256(arg_string: string, arg_encoding_method: string | undefined): string source

Hash a string with SHA256.

Params:

NameTypeAttributeDescription
arg_string string

string to hash.

arg_encoding_method string | undefined

encoding (default:hex or utf8,utf16,binary,base64,hexstr)

Return:

string

hashed string

public static sha384(arg_string: string, arg_encoding_method: string | undefined): string source

Hash a string with SHA384.

Params:

NameTypeAttributeDescription
arg_string string

string to hash.

arg_encoding_method string | undefined

encoding (default:hex or utf8,utf16,binary,base64,hexstr)

Return:

string

hashed string

public static sha512(arg_string: string, arg_encoding_method: string | undefined): string source

Hash a string with SHA512.

Params:

NameTypeAttributeDescription
arg_string string

string to hash.

arg_encoding_method string | undefined

encoding (default:hex or utf8,utf16,binary,base64,hexstr)

Return:

string

hashed string

Public Constructors

public constructor(): nothing source

Create a Digest instance.

API:
    ->hash():string - 

Return:

nothing