Skip to content

GeneratePinData

Source: src/AWS/PaymentCryptography/GeneratePinData.ts

Runtime binding for payment-cryptography:GeneratePinData — generates PIN-related data (PIN, PVV, PIN block) under a PIN generation Key (e.g. a Visa PVK) and returns the PIN block encrypted under a PIN encryption Key (PEK). Provide GeneratePinDataHttp on the Function to satisfy this service.

// init
const generatePin = yield* PaymentCryptography.GeneratePinData(pvk, pek);
// runtime
const generated = yield* generatePin({
GenerationAttributes: { VisaPin: { PinVerificationKeyIndex: 1 } },
PrimaryAccountNumber: "9123456789012345",
PinBlockFormat: "ISO_FORMAT_0",
});
// generated.EncryptedPinBlock + generated.PinData.VerificationValue