\CryptoManana\CryptographicProtocolDigitalSignature

Class DigitalSignature - The digital signature cryptographic protocol object.

Summary

Methods
Properties
Constants
setSignatureStandard()
getSignatureStandard()
__construct()
__destruct()
__clone()
createSignedData()
extractVerifiedData()
No public properties found
No constants found
No protected methods found
$signatureSource
N/A
No private methods found
No private properties found
N/A

Properties

Methods

setSignatureStandard()

setSignatureStandard(\CryptoManana\Core\Abstractions\MessageEncryption\AbstractAsymmetricEncryptionAlgorithm|\CryptoManana\Core\Interfaces\MessageEncryption\DataSigningInterface  $standard) : $this

Setter for the digital signature service.

Parameters

\CryptoManana\Core\Abstractions\MessageEncryption\AbstractAsymmetricEncryptionAlgorithm|\CryptoManana\Core\Interfaces\MessageEncryption\DataSigningInterface $standard

The digital signature service or null.

Returns

$this —

The container object.

__construct()

__construct(\CryptoManana\Core\Abstractions\MessageEncryption\AbstractAsymmetricEncryptionAlgorithm|\CryptoManana\Core\Interfaces\MessageEncryption\DataSigningInterface|null  $signatureAlgorithm = null) 

Container constructor.

Parameters

\CryptoManana\Core\Abstractions\MessageEncryption\AbstractAsymmetricEncryptionAlgorithm|\CryptoManana\Core\Interfaces\MessageEncryption\DataSigningInterface|null $signatureAlgorithm

The digital signature service.

Throws

\Exception

Initialization validation.

__destruct()

__destruct() 

Container destructor.

__clone()

__clone() 

Container cloning via deep copy.

createSignedData()

createSignedData(string  $plainData) : \CryptoManana\DataStructures\SignedData

Creates a signed data object for the given input data.

Parameters

string $plainData

The plain input string.

Throws

\Exception

Validation errors.

Returns

\CryptoManana\DataStructures\SignedData

The signed data object.

extractVerifiedData()

extractVerifiedData(\CryptoManana\DataStructures\SignedData  $signedData) : string

Verifies and extracts the plain data from a signed data object.

Parameters

\CryptoManana\DataStructures\SignedData $signedData

The signed data object.

Throws

\Exception

Validation errors.

Returns

string —

The verified plain information.