Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

Latest commit

 

History

History
27 lines (18 loc) · 660 Bytes

bip38.md

File metadata and controls

27 lines (18 loc) · 660 Bytes

BIP38

The BIP38 class provides methods to extract the numerical value out of any currency representation by normalizing the input and removing any locale specific rules like symbols and use of commas.

Importing the BIP38 class

import { BIP38 } from "@payvo/cryptography";

Encrypt a buffer with the given mnemonic

BIP38.encrypt(someBuffer, "password");

Decrypt an encrypted string with the given mnemonic

BIP38.decrypt(BIP38.encrypt(someBuffer, "password"), "password");

Decrypt a string with the given mnemonic

BIP38.verify(BIP38.encrypt("message", "password"));