src/Utils/Message.php
public static function sign(string $message, string $passphrase): self
    {
        $keys = PrivateKey::fromPassphrase($passphrase);

        return static::new([
            'publickey' => $keys->getPublicKey()->getHex(),
            'signature' => $keys->sign(Hash::sha256(new Buffer($message)))->getBuffer()->getHex(),
            'message'   => $message,
        ]);
    }
public static function sign(string $message, string $passphrase): self
    {
        $keys = PrivateKey::fromPassphrase($passphrase);

        return static::new([
            'publickey' => $keys->getPublicKey()->getHex(),
            'signature' => $keys->sign(Hash::sha256(new Buffer($message)))->getBuffer()->getHex(),
            'message'   => $message,
        ]);
    }
public static function sign ( string $ message , string $ passphrase ) : self { $ keys = PrivateKey :: fromPassphrase ( $ passphrase ) ; return static :: new ( [ 'publickey' => $ keys -> getPublicKey ( ) -> getHex ( ) , 'signature' => $ keys -> sign ( Hash :: sha256 ( new Buffer ( $ message ) ) ) -> getBuffer ( ) -> getHex ( ) , 'message' => $ message , ] ) ; }
Sign a message using the given passphrase.

@param string $message
@param string $passphrase

@return \ArkEcosystem\Crypto\Message
Sign a message using the given passphrase .