Skip to content

README shows different results from actual #5

@ggriffin

Description

@ggriffin

Should I expect to get the same encrypted result as what is shown in the README?
I get 5011 instead of 4984:

$ node
Welcome to Node.js v12.14.1.
> const fe1 = require('node-fe1-fpe');
> const v = fe1.encrypt(10001, 1, 'my-secret-key', 'my-non-secret-tweak');
> console.log(v)
5011
> const d = fe1.decrypt(10001, v, 'my-secret-key', 'my-non-secret-tweak');
> console.log(d);
1

// curious what 4984 decrypts to:
> const d2 = fe1.decrypt(10001, 4984, 'my-secret-key', 'my-non-secret-tweak');
> console.log(d2);
6786

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions