Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Request to sign

Returns

Example

Sign a request with certificate

Code Block
languagejs
var cert = $Crypto.GetCertificate('base64 encoded pfx content', 'password');
var result = $Crypto.Sign(cert, {
    Requests: [{ Source: 'Hello World', Format: 'Cades', Level: 'BES' }]
});

...

Code Block
languagejs
var cert = $Crypto.GetCertificate({
   Filter: {
        CommonName: 'The Name'
        // SerialNumber : '1234'
    },
    Pin: '1111',
    Library: '<path to PKCS11 library>',
});
var result = $Crypto.Sign(cert, {
    Requests: [{ Source: 'Hello World', Format: 'Cades', Level: 'BES' }]
});

Example

Sign a request with PKCS11 library certificate

Code Block
languagejs
var result = $Crypto.Sign({
    Filter: {
        CommonName: 'The Name'
        // SerialNumber : '1234'
    },
    Pin: '1111',
    Library: '<path to PKCS11 library>',
    Requests: [{ Source: 'Hello World', Format: 'Cades', Level: 'BES' }]
});

Types

Certificate

{ // Common name of certificate issued to CommonName : string // Serial number of certificate issued to SerialNumber : string }

...