@me2em/crypto
    Preparing search index...

    Function signRawToBase64

    • Signs a message and returns the signature as a Base64 string.

      Convenience wrapper around signRaw + toBase64.

      Parameters

      • privateKey: Uint8Array

        32-byte Ed25519 private key.

      • message: Uint8Array

        The message bytes to sign.

      Returns string

      Base64-encoded 64-byte signature.

      'SIGNATURE_FAILED' if key length ≠ 32.

      Note: signatures are public (not secret), so the string allocation in toBase64 is safe here — see toBase64's caveat.

      const sigB64 = signRawToBase64(privKey, data);