Made message signing in Cryptography use SHA512 as the message content for... #1
2 changed files with 23 additions and 9 deletions
|
@ -1,9 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Socialbox\Enums\Types;
|
||||
|
||||
enum CommunicationRecipientType : string
|
||||
{
|
||||
case SENDER = 'SENDER';
|
||||
case RECEIVER = 'RECEIVER';
|
||||
}
|
23
src/Socialbox/Enums/Types/EncryptionMessageRecipient.php
Normal file
23
src/Socialbox/Enums/Types/EncryptionMessageRecipient.php
Normal 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
|
||||
};
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue