SignedData
Class from RFC5652
Static Method Summary
Static Public Methods | ||
public static |
compareWithDefault(memberName: string, memberValue: *): * Compare values with default values for all class members |
|
public static |
defaultValues(memberName: string): *[] Return default values for all class members |
|
public static |
Return value of asn1js schema for current class |
Constructor Summary
Public Constructor | ||
public |
constructor(parameters: Object) Constructor for SignedData class |
Member Summary
Public Members | ||
public |
certificates |
|
public |
crls |
|
public |
digestAlgorithms |
|
public |
encapContentInfo |
|
public |
crls |
|
public |
signerInfos |
|
public |
version |
Method Summary
Public Methods | ||
public |
fromSchema(schema: Object) Convert parsed asn1js object into current class |
|
public |
sign(privateKey: key, signerIndex: number, hashAlgorithm: string, data: ArrayBuffer): * Signing current SignedData |
|
public |
Convertion for the class to JSON object |
|
public |
Convert current object to asn1js object and set correct values |
|
public |
Verify current SignedData value |
Static Public Methods
public static compareWithDefault(memberName: string, memberValue: *): * source
Compare values with default values for all class members
Params:
Name | Type | Attribute | Description |
memberName | string | String name for a class member |
|
memberValue | * | Value to compare with default value |
Return:
* |
Public Constructors
Public Members
Public Methods
public fromSchema(schema: Object) source
Convert parsed asn1js object into current class
Params:
Name | Type | Attribute | Description |
schema | Object |
|
public sign(privateKey: key, signerIndex: number, hashAlgorithm: string, data: ArrayBuffer): * source
Signing current SignedData
Params:
Name | Type | Attribute | Description |
privateKey | key | Private key for "subjectPublicKeyInfo" structure |
|
signerIndex | number | Index number (starting from 0) of signer index to make signature for |
|
hashAlgorithm | string |
|
Hashing algorithm. Default SHA-1 |
data | ArrayBuffer |
|
Detached data |
Return:
* |
public toSchema(encodeFlag: boolean): Object source
Convert current object to asn1js object and set correct values
Params:
Name | Type | Attribute | Description |
encodeFlag | boolean |
|
public verify(param: Object, findOrigin: Function, findIssuer: Function): * source
Verify current SignedData value
Params:
Name | Type | Attribute | Description |
param | Object |
|
|
param.signer | Number |
|
Index of the signer which information we need to verify |
param.data | ArrayBuffer |
|
|
param.trustedCerts | Array<Certificate> |
|
|
param.checkDate | Date |
|
|
param.checkChain | Boolean |
|
|
param.extendedMode | Boolean |
|
|
findOrigin | Function |
|
|
findIssuer | Function |
|
Return:
* |