\CryptoManana\Core\Traits\MessageEncryptionSignatureDataFormatsTrait

Trait SignatureDataFormatsTrait - Reusable implementation of `SignatureDataFormatsInterface`.

Summary

Methods
Properties
Constants
setSignatureFormat()
getSignatureFormat()
$$signatureFormat
No constants found
signingFormat()
verificationFormatHex()
verificationFormatBase64()
verificationFormat()
changeOutputFormat()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$$signatureFormat

$$signatureFormat : integer

The output signature format property storage.

Type

integer

Methods

setSignatureFormat()

setSignatureFormat(integer  $signatureFormat) : $this

Setter for the output signature format code property.

Parameters

integer $signatureFormat

The output signature format code.

Throws

\Exception

Validation errors.

Returns

$this —

The signature algorithm object.

getSignatureFormat()

getSignatureFormat() : integer

Getter for the output signature format code property.

Returns

integer —

The output signature format code.

signingFormat()

signingFormat(string  $bytes) 

Internal method for converting format after signing operations.

Parameters

string $bytes

The bytes for conversion.

verificationFormatHex()

verificationFormatHex(string  $bytes) 

Internal method for converting from HEX formatted string after verification operations.

Parameters

string $bytes

The bytes for conversion.

verificationFormatBase64()

verificationFormatBase64(string  $bytes) 

Internal method for converting from Base64 formatted string after verification operations.

Parameters

string $bytes

The bytes for conversion.

verificationFormat()

verificationFormat(string  $bytes) 

Internal method for converting format after verification operations.

Parameters

string $bytes

The bytes for conversion.

changeOutputFormat()

changeOutputFormat(string  $bytes, boolean|integer|null  $direction = true) : string

Internal method for converting the output format representation via the chosen format.

Parameters

string $bytes

The bytes for conversion.

boolean|integer|null $direction

Flag for signing direction (sign => true or verify => false).

Returns

string —

The formatted bytes.