Class Index | File Index

Classes


Built-In Namespace global__

Method Summary
Method Attributes Method Name and Description
 
convert a Base64 encoded string to a Base64URL encoded string.
 
convert a Base64 encoded string to a UTF-8 encoded string including CJK or Latin.
 
convert a Base64URL encoded string to a Base64 encoded string.
 
convert a Base64URL encoded string to a hexadecimal string.
 
convert a Base64URL encoded string to a ASCII string.
 
b64utoutf8(s)
 
convert an array of bytes(Number) to hexadecimal string.
 
BAtos(a)
convert an array of character codes to a string
 
convert UTFa hexadecimal string to a URLComponent string such like "%67%68".
 
convert a hexadecimal string to a Base64URL encoded string.
 
convert a hexadecimal encoded string to raw string including non printable characters.
 
convert a hexadecimal string to a URLComponent string such like "%67%68".
 
convert a hexadecimal encoded string to a UTF-8 encoded string including CJK or Latin.
 
convert string of integer array to hexadecimal string.
 
convert all UNIX new line("\r\n") to DOS new line("\n") in a String "s".
 
convert all DOS new line("\r\n") to UNIX new line("\n") in a String "s".
 
readFile(binFile)
read file and return file contents This function only works in Node.js.
 
read binary file and return file contents as hexadecimal string This function only works in Node.js.
 
readFileUTF8(utf8File)
read file and return file contents as utf-8 string This function only works in Node.js.
 
convert a raw string including non printable characters to hexadecimal encoded string.
 
saveFile(binFile, rawString)
save raw string to file This function only works in Node.js.
 
saveFileBinByHex(binFile, hexString)
save data represented by hexadecimal string to file This function only works in Node.js.
 
stob64(s)
convert a ASCII string to a Base64 encoded string.
 
convert a ASCII string to a Base64URL encoded string.
 
stoBA(s)
convert a string to an array of character codes
 
stohex(s)
convert a ASCII string to a hexadecimal string of ASCII codes.
 
strdiffidx(s1, s2)
find index of string where two string differs
 
convert a URLComponent string such like "%67%68" to a hexadecimal string.
 
convert a UTF-8 encoded string including CJK or Latin to a Base64 encoded string.
 
utf8tob64u(s)
 
convert a UTF-8 encoded string including CJK or Latin to a hexadecimal encoded string.
Method Detail
{String} b64tob64u(s)
convert a Base64 encoded string to a Base64URL encoded string.
Example: "ab+c3f/==" → "ab-c3f_"
Defined in: base64x-1.1.js.
Parameters:
{String} s
Base64 encoded string
Returns:
{String} Base64URL encoded string

{String} b64toutf8(s)
convert a Base64 encoded string to a UTF-8 encoded string including CJK or Latin.

Defined in: base64x-1.1.js.
Parameters:
{String} s
Base64 encoded string
Since:
1.1.1
Returns:
{String} UTF-8 encoded string

{String} b64utob64(s)
convert a Base64URL encoded string to a Base64 encoded string.
Example: "ab-c3f_" → "ab+c3f/=="
Defined in: base64x-1.1.js.
Parameters:
{String} s
Base64URL encoded string
Returns:
{String} Base64 encoded string

{String} b64utohex(s)
convert a Base64URL encoded string to a hexadecimal string.

Defined in: base64x-1.1.js.
Parameters:
{String} s
Base64URL encoded string
Returns:
{String} hexadecimal string

{String} b64utos(s)
convert a Base64URL encoded string to a ASCII string.
NOTE: This can't be used for Base64URL encoded non ASCII characters.
Defined in: base64x-1.1.js.
Parameters:
{s} s
Base64URL encoded string
Returns:
{String} ASCII string

b64utoutf8(s)

Defined in: base64x-1.1.js.
Parameters:
s

{String} BAtohex(a)
convert an array of bytes(Number) to hexadecimal string.

Defined in: base64x-1.1.js.
Parameters:
{Array of Numbers} a
array of bytes
Returns:
{String} hexadecimal string

{String} BAtos(a)
convert an array of character codes to a string
Defined in: base64x-1.1.js.
Parameters:
{Array of Numbers} a
array of character codes
Returns:
{String} s

{String} encodeURIComponentAll(s)
convert UTFa hexadecimal string to a URLComponent string such like "%67%68".
Note that these "0-9A-Za-z!'()*-._~" characters will not converted to "%xx" format by builtin 'encodeURIComponent()' function. However this 'encodeURIComponentAll()' function will convert all of characters into "%xx" format.
Defined in: base64x-1.1.js.
Parameters:
{String} s
hexadecimal string
Since:
1.1
Returns:
{String} URIComponent string such like "%67%68"

{String} hextob64u(s)
convert a hexadecimal string to a Base64URL encoded string.
convert a hexadecimal string to a Base64URL encoded string. NOTE: If leading "0" is omitted and odd number length for hexadecimal leading "0" is automatically added.
Defined in: base64x-1.1.js.
Parameters:
{String} s
hexadecimal string
Returns:
{String} Base64URL encoded string

{String} hextorstr(s)
convert a hexadecimal encoded string to raw string including non printable characters.

Defined in: base64x-1.1.js.
hextorstr("610061") → "a\x00a"
Parameters:
{String} s
hexadecimal encoded string
Since:
1.1.2
Returns:
{String} raw string

{String} hextouricmp(s)
convert a hexadecimal string to a URLComponent string such like "%67%68".

Defined in: base64x-1.1.js.
Parameters:
{String} s
hexadecimal string
Since:
1.1
Returns:
{String} URIComponent string such like "%67%68"

{String} hextoutf8(s)
convert a hexadecimal encoded string to a UTF-8 encoded string including CJK or Latin.
Note that when input is improper hexadecimal string as UTF-8 string, this function returns 'null'.
Defined in: base64x-1.1.js.
Parameters:
{String} s
hexadecimal encoded string
Since:
1.1.1
Returns:
{String} UTF-8 encoded string or null

{String} intarystrtohex(s)
convert string of integer array to hexadecimal string.
This function converts a string of JavaScript integer array to a hexadecimal string. Each integer value shall be in a range from 0 to 255 otherwise it raise exception. Input string can have extra space or newline string so that they will be ignored.
Defined in: base64x-1.1.js.
intarystrtohex(" [123, 34, 101, 34, 58] ")
-> 7b2265223a (i.e. `{"e":` as string)
Parameters:
{String} s
string of integer array
Since:
base64x 1.1.6 jsrsasign 5.0.2
Throws:
"malformed integer array string: *" for wrong input
Returns:
{String} hexadecimal string

{String} newline_toDos(s)
convert all UNIX new line("\r\n") to DOS new line("\n") in a String "s".
Defined in: base64x-1.1.js.
Parameters:
{String} s
string
Returns:
{String} converted string

{String} newline_toUnix(s)
convert all DOS new line("\r\n") to UNIX new line("\n") in a String "s".
Defined in: base64x-1.1.js.
Parameters:
{String} s
string
Returns:
{String} converted string

{String} readFile(binFile)
read file and return file contents This function only works in Node.js.
Defined in: nodeutil-1.0.js.
Parameters:
{String} binFile
file name to be read
Returns:
{String} raw string of file contents

{String} readFileHexByBin(binFile)
read binary file and return file contents as hexadecimal string This function only works in Node.js.
Defined in: nodeutil-1.0.js.
Parameters:
{String} binFile
file name to be read
Returns:
{String} hexadecimal string of file contents

{String} readFileUTF8(utf8File)
read file and return file contents as utf-8 string This function only works in Node.js.
Defined in: nodeutil-1.0.js.
Parameters:
{String} utf8File
file name to be read
Returns:
{String} utf-8 string of file contents

{String} rstrtohex(s)
convert a raw string including non printable characters to hexadecimal encoded string.

Defined in: base64x-1.1.js.
rstrtohex("a\x00a") → "610061"
Parameters:
{String} s
raw string
Since:
1.1.2
Returns:
{String} hexadecimal encoded string

saveFile(binFile, rawString)
save raw string to file This function only works in Node.js.
Defined in: nodeutil-1.0.js.
Parameters:
{String} binFile
file name to save contents.
{String} rawString
string contents to be saved.

saveFileBinByHex(binFile, hexString)
save data represented by hexadecimal string to file This function only works in Node.js.
Defined in: nodeutil-1.0.js.
Parameters:
{String} binFile
file name to save contents.
{String} hexString
hexadecimal string to be saved.

{String} stob64(s)
convert a ASCII string to a Base64 encoded string.
NOTE: This can't be used for non ASCII characters.
Defined in: base64x-1.1.js.
Parameters:
{s} s
ASCII string
Returns:
{String} Base64 encoded string

{String} stob64u(s)
convert a ASCII string to a Base64URL encoded string.
NOTE: This can't be used for non ASCII characters.
Defined in: base64x-1.1.js.
Parameters:
{s} s
ASCII string
Returns:
{String} Base64URL encoded string

{Array of Numbers} stoBA(s)
convert a string to an array of character codes
Defined in: base64x-1.1.js.
Parameters:
{String} s
Returns:
{Array of Numbers}

{String} stohex(s)
convert a ASCII string to a hexadecimal string of ASCII codes.
NOTE: This can't be used for non ASCII characters.
Defined in: base64x-1.1.js.
Parameters:
{s} s
ASCII string
Returns:
{String} hexadecimal string

{Number} strdiffidx(s1, s2)
find index of string where two string differs
Defined in: base64x-1.1.js.
strdiffidx("abcdefg", "abcd4fg") -> 4
strdiffidx("abcdefg", "abcdefg") -> -1
strdiffidx("abcdefg", "abcdef") -> 6
strdiffidx("abcdefgh", "abcdef") -> 6
Parameters:
{String} s1
string to compare
{String} s2
string to compare
Since:
jsrsasign 4.9.0 base64x 1.1.5
Returns:
{Number} string index of where character differs. Return -1 if same.

{String} uricmptohex(s)
convert a URLComponent string such like "%67%68" to a hexadecimal string.

Defined in: base64x-1.1.js.
Parameters:
{String} s
URIComponent string such like "%67%68"
Since:
1.1
Returns:
{String} hexadecimal string

{String} utf8tob64(s)
convert a UTF-8 encoded string including CJK or Latin to a Base64 encoded string.

Defined in: base64x-1.1.js.
Parameters:
{String} s
UTF-8 encoded string
Since:
1.1.1
Returns:
{String} Base64 encoded string

utf8tob64u(s)

Defined in: base64x-1.1.js.
Parameters:
s

{String} utf8tohex(s)
convert a UTF-8 encoded string including CJK or Latin to a hexadecimal encoded string.

Defined in: base64x-1.1.js.
Parameters:
{String} s
UTF-8 encoded string
Since:
1.1.1
Returns:
{String} hexadecimal encoded string

© 2012-2015 Kenji Urushima, All rights reserved
Documentation generated by JsDoc Toolkit 2.4.0