\Threema\ConsoleCommon

Summary

Methods
Properties
Constants
l()
ln()
e()
required()
convertPublicKey()
getPublicKey()
convertPrivateKey()
getPrivateKey()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

l()

l(string  $string = '', integer  $indent) 

output a string, wrap at 100 chars

Parameters

string $string

string to output

integer $indent

indent

ln()

ln(string  $string = '') 

output a line

Parameters

string $string

string to output

e()

e(string  $msg) 

output a error message to the stderr

Parameters

string $msg

required()

required() 

check arguments for null, throws an exception on null or strlen == 0

Throws

\Threema\Core\Exception

convertPublicKey()

convertPublicKey(string  $key) : null|string

Append the prefix to the the PublicKey @key

Parameters

string $key

PublicKey in hex

Returns

null|string

getPublicKey()

getPublicKey(string  $stringWithPrefix = null) : null|string

Extract the PublicKey

Parameters

string $stringWithPrefix

PublicKey in hex with the key-prefix

Returns

null|string

convertPrivateKey()

convertPrivateKey(string  $key) : null|string

Append the prefix to the the PrivateKey @key

Parameters

string $key

PrivateKey in hex

Returns

null|string

getPrivateKey()

getPrivateKey(string  $stringWithPrefix = null) : null|string

Extract the PrivateKey

Parameters

string $stringWithPrefix

PrivateKey in hex with the key-prefix (@Constants::PRIVATE_KEY_PREFIX)

Returns

null|string