Skip to content

verify Method Parameter Order Mismatch (Docs vs Native Code) #173

@ahui-cmd

Description

@ahui-cmd

Confirmed Mismatch

  1. Documented/TS Order (per README & index.d.ts - official guide):
    verify(data: string, signature: string, key: string)
    → Expected Input Order: data→ signature → key

  2. Native Implementation Order (verified via iOS/Android source code & testing):
    Both iOS (RSA.swift) and Android (RSAModule.java) expect:
    verify(signature: string, withMessage: string, key: string)
    → Actual Working Order: signature → withMessage→ key

Reproducible Steps

  1. Prepare valid data (original message), signature (signed string), and publicKey.
  2. Call with documented order (Fails, returns false):
    const isVerified = await RSA.verify(data, signature, publicKey);
  3. Call with native order (Succeeds, returns correct boolean):
    const isVerified = await RSA.verify(signature, data, publicKey);

Expected Resolution

  1. Update docs/index.d.ts to clearly state the actual working order: signature → data→ key.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions