python.pyasn1表达以下结构

时间:2019-03-05 09:09:48

标签: python pyasn1

我是Python和PYASN1的新手,如何表达以下结构?有什么我可以参考的文件吗?我搜索该实习生,有一个有关PYASN1的小文件

let
    Source = Excel.CurrentWorkbook(){[Name="Data"]}[Content],
    group = Table.Group(Source, {"TopPaymendId"}, {"TopAmount", each List.Sum([JournalLineNetAmount])}),
    join = Table.Join(Source,{"TopPaymendId"},group,{"TopPaymendId"}),
    replace = Table.ReplaceValue(join,each [TopAmount],each if [TopPaymendId] = null 
              then [JournalLineNetAmount] else [TopAmount],Replacer.ReplaceValue,{"TopAmount"})
in
    replace

1 个答案:

答案 0 :(得分:0)

应该是这样,假设您的ASN.1模块默认声明了显式标记。

还有docs

class KeySpecificInfo(univ.Sequence):
    componentType = namedtype.NamedTypes(
        namedtype.NamedType('algorithm', ObjectIdentifier()),
        namedtype.NamedType(
            'counter', OctetString().subtype(subtypeSpec=ValueSizeConstraint(4, 4)))
    )

class OtherInfo(univ.Sequence):
    componentType = namedtype.NamedTypes(
        namedtype.NamedType('keyInfo', KeySpecificInfo()),
        namedtype.OptionalNamedType('partyAInfo', OctetString().subtype(
            explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0)),
        namedtype.NamedType('suppPubInfo', OctetString().subtype(
            explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 2))
    )