Crypto

Secure Compare

Constant-time string compare.

How to use Secure Compare

Secure Compare — Compare two strings in constant time and report match or mismatch. Free to use in D2i DevTools — no account required.

Steps

  1. Fill in String A. This field is required.
  2. Fill in String B. This field is required.
  3. Click Run and copy the result under the form.

Frequently asked questions

What is Secure Compare used for?

Use it to check tokens or MACs that are equal length without stopping at the first different byte.

How do I use the free online Secure Compare tool?

Fill in String A. This field is required. Fill in String B. This field is required. Click Run and copy the result under the form.

What can I paste or upload into Secure Compare?

Paste string A and string B exactly, including spaces. They are compared as UTF-8 bytes, not as hex.

What output does Secure Compare give me?

match or mismatch. Different lengths are a mismatch. The strings are not saved.

Is Secure Compare free, and is my input private?

Yes — Your input is processed in memory for this request only. It is not saved to disk or the database, and it is cleared after the tool finishes.

How is this different from Compare Digests?

Compare Digests decodes hex first. Secure Compare compares the raw strings you paste, so a hex digest and the same letters as text are different tools.

Inputs are processed in memory only and are not saved to disk or the database. Data exists only for the duration of your request.