summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorIlya Etingof <etingof@gmail.com>2017-11-14 11:55:22 +0100
committerIlya Etingof <etingof@gmail.com>2017-11-14 11:55:22 +0100
commit81865c1e67a33dbfcbb7a8f4ce9cfb12cc093295 (patch)
tree816eaab587cb7c0d81b952e0a1f6f33f392f3af4 /docs
parentc34f53e7ee787577482f9e1b67ea507299dd3be3 (diff)
downloadpyasn1-git-81865c1e67a33dbfcbb7a8f4ce9cfb12cc093295.tar.gz
serialization -> serialisation nitpicks
Diffstat (limited to 'docs')
-rw-r--r--docs/source/contents.rst8
-rw-r--r--docs/source/example-use-case.rst26
-rw-r--r--docs/source/pyasn1/contents.rst14
-rw-r--r--docs/source/pyasn1/type/char/bmpstring.rst2
-rw-r--r--docs/source/pyasn1/type/char/universalstring.rst2
-rw-r--r--docs/source/pyasn1/type/char/utf8string.rst2
-rw-r--r--docs/source/pyasn1/type/univ/any.rst2
-rw-r--r--docs/source/pyasn1/type/univ/sequence.rst2
-rw-r--r--docs/source/pyasn1/type/univ/sequenceof.rst2
-rw-r--r--docs/source/pyasn1/type/univ/set.rst2
-rw-r--r--docs/source/pyasn1/type/univ/setof.rst2
11 files changed, 32 insertions, 32 deletions
diff --git a/docs/source/contents.rst b/docs/source/contents.rst
index c4582bd..2613984 100644
--- a/docs/source/contents.rst
+++ b/docs/source/contents.rst
@@ -18,10 +18,10 @@ What is ASN.1
-------------
ASN.1 is a large, arguably over-engineered and extremely old data modelling and
-serialization tool. It is probably among the first serialization protocols in
+serialisation tool. It is probably among the first serialisation protocols in
the history of computer science and technology.
-ASN.1 started its life over 30 years ago as a serialization mechanism for the first
+ASN.1 started its life over 30 years ago as a serialisation mechanism for the first
electronic mail (known as X.400). Later on if was split off the e-mail application
and become a stand-alone tech still being actively supported by its designers
and widely used in industry and technology.
@@ -30,7 +30,7 @@ Since then ASN.1 is sort of haunted by its relations with the OSI model -- the
first, unsuccessful, version of the Internet. You can read many interesting
`discussions <https://news.ycombinator.com/item?id=8871453>`_ on that topic.
-In the following years, generations of software engineers tackled the serialization
+In the following years, generations of software engineers tackled the serialisation
problem many times. We can see that in Google's `ProtoBuffers <https://developers.google.com/protocol-buffers/>`_
or `FlatBuffers <https://google.github.io/flatbuffers/>`_, for example.
Interestingly, many new takes on binary protocol design do not depart
@@ -44,7 +44,7 @@ Looking at what ASN.1 has to offer, it has three loosely coupled parts:
(integers, bits, strings, arrays and records) that can be used for describing
arbitrarily complex, nested data structures.
-* Serialization protocols: the above data structures could be converted into a
+* Serialisation protocols: the above data structures could be converted into a
series of octets for storage or transmission over the wire as well as
recovered back into their structured form. The system is fully agnostic
to hardware architectures differences.
diff --git a/docs/source/example-use-case.rst b/docs/source/example-use-case.rst
index d5be0cd..0b819c3 100644
--- a/docs/source/example-use-case.rst
+++ b/docs/source/example-use-case.rst
@@ -98,13 +98,13 @@ set on the key file):
# Read SSH key from file (assuming no passphrase)
with open open('.ssh/id_rsa') as key_file:
- b64_serialization = ''.join(key_file.readlines()[1:-1])
+ b64_serialisation = ''.join(key_file.readlines()[1:-1])
- # Undo BASE64 serialization
- der_serialization = b64decode(b64_serialization)
+ # Undo BASE64 serialisation
+ der_serialisation = b64decode(b64_serialisation)
- # Undo DER serialization, reconstruct SSH key structure
- private_key, rest_of_input = der_decoder(der_serialization, asn1Spec=RSAPrivateKey())
+ # Undo DER serialisation, reconstruct SSH key structure
+ private_key, rest_of_input = der_decoder(der_serialisation, asn1Spec=RSAPrivateKey())
Once we have Python ASN.1 structures initialized, we could inspect them:
@@ -173,21 +173,21 @@ Write it back
-------------
Possibly not that applicable to the SSH key example, but you can of course modify
-any part of the ASN.1 data structure and serialize it back into the same or other
+any part of the ASN.1 data structure and serialise it back into the same or other
wire representation:
.. code-block:: python
from pyasn1.codec.der.encoder import encode as der_encoder
- # Serialize SSH key data structure into DER stream
- der_serialization = der_encoder(private_key)
+ # Serialise SSH key data structure into DER stream
+ der_serialisation = der_encoder(private_key)
- # Serialize DER stream into BASE64 stream
- b64_serialization = '-----BEGIN RSA PRIVATE KEY-----\n'
- b64_serialization += b64encode(der_serialization)
- b64_serialization += '-----END RSA PRIVATE KEY-----\n'
+ # Serialise DER stream into BASE64 stream
+ b64_serialisation = '-----BEGIN RSA PRIVATE KEY-----\n'
+ b64_serialisation += b64encode(der_serialisation)
+ b64_serialisation += '-----END RSA PRIVATE KEY-----\n'
with open('.ssh/id_rsa.new', 'w') as key_file:
- key_file.write(b64_serialization)
+ key_file.write(b64_serialisation)
diff --git a/docs/source/pyasn1/contents.rst b/docs/source/pyasn1/contents.rst
index 57ba4b2..102ea87 100644
--- a/docs/source/pyasn1/contents.rst
+++ b/docs/source/pyasn1/contents.rst
@@ -167,7 +167,7 @@ Serialisation codecs
Common use-case for pyasn1 is to instantiate ASN.1 schema with
user-supplied values and pass instantiated schema to the encoder.
-The encoder will then turn the data structure into serialized form
+The encoder will then turn the data structure into serialised form
(stream of bytes) suitable for storing into a file or sending over
the network.
@@ -176,7 +176,7 @@ the network.
value = 1
instantiated_schema = Integer(value)
- serialized = encode(instantiated_schema)
+ serialised = encode(instantiated_schema)
Alternatively, value and schema can be passed separately:
@@ -185,24 +185,24 @@ Alternatively, value and schema can be passed separately:
value = 1
schema = Integer()
- serialized = encode(value, asn1Spec=schema)
+ serialised = encode(value, asn1Spec=schema)
At the receiving end, a decoder would be invoked and given the
-serialized data as received from the network along with the ASN.1
+serialised data as received from the network along with the ASN.1
schema describing the layout of the data structures. The outcome
would be an instance of ASN.1 schema filled with values as supplied
by the sender.
.. code-block:: python
- serialized = b'\x01\x01\x01'
+ serialised = b'\x01\x01\x01'
schema = Integer()
- value, _ = decode(serialized, asn1Spec=schema)
+ value, _ = decode(serialised, asn1Spec=schema)
assert value == 1
-Many distinct serialization protocols exist for ASN.1, some are
+Many distinct serialisation protocols exist for ASN.1, some are
implemented in pyasn1.
.. toctree::
diff --git a/docs/source/pyasn1/type/char/bmpstring.rst b/docs/source/pyasn1/type/char/bmpstring.rst
index 24040c7..066d03a 100644
--- a/docs/source/pyasn1/type/char/bmpstring.rst
+++ b/docs/source/pyasn1/type/char/bmpstring.rst
@@ -13,7 +13,7 @@
.. note::
- The |ASN.1| type models a Unicode (ISO10646-1) character string implicitly serialized into UTF-16 big endian.
+ The |ASN.1| type models a Unicode (ISO10646-1) character string implicitly serialised into UTF-16 big endian.
.. automethod:: pyasn1.type.char.BMPString.clone(value=NoValue(), tagSet=TagSet(), subtypeSpec=ConstraintsIntersection(), encoding='us-ascii')
.. automethod:: pyasn1.type.char.BMPString.subtype(value=NoValue(), implicitTag=Tag(), explicitTag=Tag(),subtypeSpec=ConstraintsIntersection(), encoding='us-ascii')
diff --git a/docs/source/pyasn1/type/char/universalstring.rst b/docs/source/pyasn1/type/char/universalstring.rst
index 5e4c8b4..3c947b8 100644
--- a/docs/source/pyasn1/type/char/universalstring.rst
+++ b/docs/source/pyasn1/type/char/universalstring.rst
@@ -13,7 +13,7 @@
.. note::
- The |ASN.1| type models a Unicode (ISO10646-1) character string implicitly serialized into UTF-32 big endian.
+ The |ASN.1| type models a Unicode (ISO10646-1) character string implicitly serialised into UTF-32 big endian.
.. automethod:: pyasn1.type.char.UniversalString.clone(value=NoValue(), tagSet=TagSet(), subtypeSpec=ConstraintsIntersection(), encoding='us-ascii')
.. automethod:: pyasn1.type.char.UniversalString.subtype(value=NoValue(), implicitTag=Tag(), explicitTag=Tag(),subtypeSpec=ConstraintsIntersection(), encoding='us-ascii')
diff --git a/docs/source/pyasn1/type/char/utf8string.rst b/docs/source/pyasn1/type/char/utf8string.rst
index 380feb7..cf3a80f 100644
--- a/docs/source/pyasn1/type/char/utf8string.rst
+++ b/docs/source/pyasn1/type/char/utf8string.rst
@@ -13,7 +13,7 @@
.. note::
- The |ASN.1| type models a Unicode (ISO10646-1) character string implicitly serialized into UTF-8.
+ The |ASN.1| type models a Unicode (ISO10646-1) character string implicitly serialised into UTF-8.
.. automethod:: pyasn1.type.char.UTF8String.clone(value=NoValue(), tagSet=TagSet(), subtypeSpec=ConstraintsIntersection(), encoding='us-ascii')
.. automethod:: pyasn1.type.char.UTF8String.subtype(value=NoValue(), implicitTag=Tag(), explicitTag=Tag(),subtypeSpec=ConstraintsIntersection(), encoding='us-ascii')
diff --git a/docs/source/pyasn1/type/univ/any.rst b/docs/source/pyasn1/type/univ/any.rst
index 6727519..e4a7876 100644
--- a/docs/source/pyasn1/type/univ/any.rst
+++ b/docs/source/pyasn1/type/univ/any.rst
@@ -16,7 +16,7 @@
The |ASN.1| type models an arbitrary value of an arbitrary type. Typically,
a selection of types are defined in form of an
`open type </pyasn1/type/opentype/contents>`_ . Technically, the ANY
- value is a serialized representation of some other ASN.1 object.
+ value is a serialised representation of some other ASN.1 object.
.. automethod:: pyasn1.type.univ.Any.clone(value=NoValue(), tagSet=TagSet(), subtypeSpec=ConstraintsIntersection(), encoding='iso-8859-1')
.. automethod:: pyasn1.type.univ.Any.subtype(value=NoValue(), implicitTag=Tag(), explicitTag=Tag(),subtypeSpec=ConstraintsIntersection(),encoding='iso-8859-1')
diff --git a/docs/source/pyasn1/type/univ/sequence.rst b/docs/source/pyasn1/type/univ/sequence.rst
index 7b0549e..6d2c6b5 100644
--- a/docs/source/pyasn1/type/univ/sequence.rst
+++ b/docs/source/pyasn1/type/univ/sequence.rst
@@ -13,7 +13,7 @@
.. note::
The |ASN.1| type models a collection of named ASN.1 components.
- Ordering of the components **is** preserved upon de/serialization.
+ Ordering of the components **is** preserved upon de/serialisation.
.. automethod:: pyasn1.type.univ.Sequence.clone(componentType=None, tagSet=tagSet(), subtypeSpec=ConstraintsIntersection())
.. automethod:: pyasn1.type.univ.Sequence.subtype(componentType=None, implicitTag=Tag(), explicitTag=Tag(),subtypeSpec=ConstraintsIntersection())
diff --git a/docs/source/pyasn1/type/univ/sequenceof.rst b/docs/source/pyasn1/type/univ/sequenceof.rst
index 52c9d50..dadef67 100644
--- a/docs/source/pyasn1/type/univ/sequenceof.rst
+++ b/docs/source/pyasn1/type/univ/sequenceof.rst
@@ -13,7 +13,7 @@
.. note::
The |ASN.1| type models a collection of elements of a single ASN.1 type.
- Ordering of the components **is** preserved upon de/serialization.
+ Ordering of the components **is** preserved upon de/serialisation.
.. automethod:: pyasn1.type.univ.SequenceOf.clone(componentType=None, tagSet=TagSet(), subtypeSpec=ConstraintsIntersection())
.. automethod:: pyasn1.type.univ.SequenceOf.subtype(componentType=None, implicitTag=Tag(), explicitTag=Tag(),subtypeSpec=ConstraintsIntersection())
diff --git a/docs/source/pyasn1/type/univ/set.rst b/docs/source/pyasn1/type/univ/set.rst
index f44d09e..5c75938 100644
--- a/docs/source/pyasn1/type/univ/set.rst
+++ b/docs/source/pyasn1/type/univ/set.rst
@@ -14,7 +14,7 @@
.. note::
The |ASN.1| type models a collection of named ASN.1 components.
- Ordering of the components **is not** preserved upon de/serialization.
+ Ordering of the components **is not** preserved upon de/serialisation.
.. automethod:: pyasn1.type.univ.Set.clone(componentType=None, tagSet=TagSet(), subtypeSpec=ConstraintsIntersection())
.. automethod:: pyasn1.type.univ.Set.subtype(componentType=None, implicitTag=Tag(), explicitTag=Tag(),subtypeSpec=ConstraintsIntersection())
diff --git a/docs/source/pyasn1/type/univ/setof.rst b/docs/source/pyasn1/type/univ/setof.rst
index a943a88..0317f4a 100644
--- a/docs/source/pyasn1/type/univ/setof.rst
+++ b/docs/source/pyasn1/type/univ/setof.rst
@@ -13,7 +13,7 @@
.. note::
The |ASN.1| type models a collection of elements of a single ASN.1 type.
- Ordering of the components **is not** preserved upon de/serialization.
+ Ordering of the components **is not** preserved upon de/serialisation.
.. automethod:: pyasn1.type.univ.SetOf.clone(componentType=None, tagSet=TagSet(), subtypeSpec=ConstraintsIntersection())
.. automethod:: pyasn1.type.univ.SetOf.subtype(componentType=None, implicitTag=Tag(), explicitTag=Tag(),subtypeSpec=ConstraintsIntersection())