Module: arc4

arc4 normal

Version:
  • 3.0.0
Author:
License:
  • GPLv3

Classes

Arc4

Methods


<inner> body(inp, gksa, container, length)

body cipher

Parameters:
Name Type Description
inp Array | Buffer

input

gksa Array

ksa box

container Array | Buffer

out container

length Integer

limit

Returns:
Type
Array | Buffer

<inner> change(key)

change user key

Parameters:
Name Type Description
key String | Array | Buffer

user key


<inner> codeString(str)

Arc4 string code

Parameters:
Name Type Description
str String

data

Deprecated:
  • Yes
Returns:
Type
String

<inner> decode(boh, input_encoding, output_encoding)

Arc4 mixed decode

Parameters:
Name Type Argument Description
boh String | Array | Buffer

data

input_encoding String <optional>

input

output_encoding String <optional>

output


<inner> decodeArray(arr)

Arc4 array code

Parameters:
Name Type Description
arr Array

data

Returns:
Type
Array

<inner> decodeBuffer(buff)

Arc4 buffer code

Parameters:
Name Type Description
buff Buffer

data

Returns:
Type
Buffer

<inner> decodeString(str, input_encoding, output_encoding)

Arc4 string decode

Parameters:
Name Type Argument Description
str String

data

input_encoding String <optional>

input

output_encoding String <optional>

output

Returns:
Type
String

<inner> encode(boh, input_encoding, output_encoding)

Arc4 mixed encode

Parameters:
Name Type Argument Description
boh String | Array | Buffer

data

input_encoding String <optional>

input

output_encoding String <optional>

output


<inner> encodeString(str, input_encoding, output_encoding)

Arc4 string encode

Parameters:
Name Type Argument Description
str String

data

input_encoding String <optional>

input

output_encoding String <optional>

output

Returns:
Type
String

<inner> gKsa(key)

generate ksa

Parameters:
Name Type Description
key Array

user key

Returns:
Type
Array

<inner> normal(password)

export class

Parameters:
Name Type Description
password String | Array | Buffer

user key

Returns:
Type
Arc4