UNPKG

braintree

Version:

A library for server-side integrating with Braintree.

15 lines (11 loc) 276 B
"use strict"; class SignatureService { constructor(key, hashFunction) { this.key = key; this.hashFunction = hashFunction; } sign(data) { return `${this.hashFunction(this.key, data)}|${data}`; } } module.exports = { SignatureService: SignatureService };