| OLD | NEW |
| 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Helper module for ASN.1/DER encoding.""" | 5 """Helper module for ASN.1/DER encoding.""" |
| 6 | 6 |
| 7 import binascii | 7 import binascii |
| 8 import struct | 8 import struct |
| 9 | 9 |
| 10 # Tags as defined by ASN.1. | 10 # Tags as defined by ASN.1. |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 | 51 |
| 52 def Sequence(values): | 52 def Sequence(values): |
| 53 """Encodes a sequence of other values. | 53 """Encodes a sequence of other values. |
| 54 | 54 |
| 55 Args: | 55 Args: |
| 56 values: the list of values, must be strings holding already encoded data. | 56 values: the list of values, must be strings holding already encoded data. |
| 57 Returns: | 57 Returns: |
| 58 encoded TLV value. | 58 encoded TLV value. |
| 59 """ | 59 """ |
| 60 return Data(SEQUENCE, ''.join(values)) | 60 return Data(SEQUENCE, ''.join(values)) |
| OLD | NEW |