node_modules/hybrid-crypto-js/web/hybrid-crypto.js
/**
 * Map messages encrypted content to ASN.1 objects.
 *
 * @param ec The encryptedContent object of the message.
 *
 * @return ASN.1 representation of the encryptedContent object (SEQUENCE).
 */
Map messages encrypted content to ASN.1 objects.
@param ec The encryptedContent object of the message.

@return ASN.1 representation of the encryptedContent object (SEQUENCE).
Map messages encrypted content to ASN . 1 objects . @param ec The encryptedContent object of the message . @return ASN . 1 representation of the encryptedContent object ( SEQUENCE ) .
function _encryptedContentToAsn1(ec) {
  return [
    asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,
      asn1.oidToDer(forge.pki.oids.data).getBytes()),
    asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [
      asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,
        asn1.oidToDer(ec.algorithm).getBytes()),
      asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false,
        ec.parameter.getBytes())
    ]),
    asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, true, [
      asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false,
        ec.content.getBytes())
    ])
  ];
}
function _encryptedContentToAsn1 ( ec ) { return [ asn1 . create ( asn1 . Class . UNIVERSAL , asn1 . Type . OID , false , asn1 . oidToDer ( forge . pki . oids . data ) . getBytes ( ) ) , asn1 . create ( asn1 . Class . UNIVERSAL , asn1 . Type . SEQUENCE , true , [ asn1 . create ( asn1 . Class . UNIVERSAL , asn1 . Type . OID , false , asn1 . oidToDer ( ec . algorithm ) . getBytes ( ) ) , asn1 . create ( asn1 . Class . UNIVERSAL , asn1 . Type . OCTETSTRING , false , ec . parameter . getBytes ( ) ) ] ) , asn1 . create ( asn1 . Class . CONTEXT_SPECIFIC , 0 , true , [ asn1 . create ( asn1 . Class . UNIVERSAL , asn1 . Type . OCTETSTRING , false , ec . content . getBytes ( ) ) ] ) ] ; }
Map messages encrypted content to ASN.1 objects.
Map messages encrypted content to ASN . 1 objects .
// ContentType, always Data for the moment // ContentEncryptionAlgorithmIdentifier // Algorithm // Parameters (IV) // [0] EncryptedContent