public static function encryptSignMessage($message, $encryptionKey, $signatureKey, $hashKey = '')
    {
        # Test the message and key for string validity.
        Helpers::isString($message, 'Encryption', 'encryptSignMessage');
        Helpers::isString($encryptionKey, 'Encryption', 'encryptSignMessage');
        Helpers::isString($signatureKey, 'Encryption', 'encryptSignMessage');
        Helpers::isString($hashKey, 'Encryption', 'encryptSignMessage');

        $message = self::encryptMessage($message, $encryptionKey, $hashKey);

        return self::signMessage($message, $signatureKey, $hashKey);
    }
public static function encryptSignMessage($message, $encryptionKey, $signatureKey, $hashKey = '')
    {
        # Test the message and key for string validity.
        Helpers::isString($message, 'Encryption', 'encryptSignMessage');
        Helpers::isString($encryptionKey, 'Encryption', 'encryptSignMessage');
        Helpers::isString($signatureKey, 'Encryption', 'encryptSignMessage');
        Helpers::isString($hashKey, 'Encryption', 'encryptSignMessage');

        $message = self::encryptMessage($message, $encryptionKey, $hashKey);

        return self::signMessage($message, $signatureKey, $hashKey);
    }
public static function encryptSignMessage ( $ message , $ encryptionKey , $ signatureKey , $ hashKey = '' ) { # Test the message and key for string validity. Helpers :: isString ( $ message , 'Encryption' , 'encryptSignMessage' ) ; Helpers :: isString ( $ encryptionKey , 'Encryption' , 'encryptSignMessage' ) ; Helpers :: isString ( $ signatureKey , 'Encryption' , 'encryptSignMessage' ) ; Helpers :: isString ( $ hashKey , 'Encryption' , 'encryptSignMessage' ) ; $ message = self :: encryptMessage ( $ message , $ encryptionKey , $ hashKey ) ; return self :: signMessage ( $ message , $ signatureKey , $ hashKey ) ; }
Sign and encrypt a message for security.

@param string $message The message to be encrypted and signed for transport.
@param string $encryptionKey The encryption key used with the message.
@param string $signatureKey The signing key used with the message.
@param string $hashKey The key to hash the key with.
@return string The encrypted and signed JSON string with message data.
@throws Exceptions\InvalidTypeException
Sign and encrypt a message for security .