ParagonIE_Sodium_Core32_Ed25519::sign_open() public WP 1.0
{} It's a method of the class: ParagonIE_Sodium_Core32_Ed25519{}
No Hooks.
Return
String
. Message (without signature)
Usage
$result = ParagonIE_Sodium_Core32_Ed25519::sign_open( $message, $pk );
- $message(string) (required)
- A signed message
- $pk(string) (required)
- Public key
Code of ParagonIE_Sodium_Core32_Ed25519::sign_open() ParagonIE Sodium Core32 Ed25519::sign open WP 5.7
public static function sign_open($message, $pk)
{
/** @var string $signature */
$signature = self::substr($message, 0, 64);
/** @var string $message */
$message = self::substr($message, 64);
if (self::verify_detached($signature, $message, $pk)) {
return $message;
}
throw new SodiumException('Invalid signature');
}