Made message signing in Cryptography use SHA512 as the message content for... #1

Closed
netkas wants to merge 421 commits from master into dev
2 changed files with 23 additions and 9 deletions
Showing only changes of commit 28a5cb9b07 - Show all commits

View file

@ -1,9 +0,0 @@
<?php
namespace Socialbox\Enums\Types;
enum CommunicationRecipientType : string
{
case SENDER = 'SENDER';
case RECEIVER = 'RECEIVER';
}

View file

@ -0,0 +1,23 @@
<?php
namespace Socialbox\Enums\Types;
enum EncryptionMessageRecipient : string
{
case SENDER = 'SENDER';
case RECEIVER = 'RECEIVER';
/**
* Reverses the role of the recipient
*
* @return EncryptionMessageRecipient
*/
public function reverse(): EncryptionMessageRecipient
{
return match($this)
{
self::SENDER => self::RECEIVER,
self::RECEIVER => self::SENDER
};
}
}