Skip to content

Commit 110be71

Browse files
committed
f update README files
1 parent ebf6598 commit 110be71

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ in the `subscription_info` block.
6565
*data* - can be any serial content (string, bit array, serialized JSON, etc), but be sure that your receiving
6666
application is able to parse and understand it. (e.g. `data = "Mary had a little lamb."`)
6767

68-
*content_type* - specifies the form of Encryption to use, either `'aesgcm'` or the newer `'aes128gcm'`. NOTE that
69-
not all User Agents can decrypt `'aes128gcm'`, so the library defaults to the older form.
68+
*content_type* - specifies the form of Encryption to use, either `'aes128gcm'` or the deprecated `'aesgcm'`. NOTE that
69+
not all User Agents can decrypt `'aesgcm'`, so the library defaults to the RFC 8188 standard form.
7070

7171
*vapid_claims* - a `dict` containing the VAPID claims required for authorization (See
7272
[py_vapid](https://github.com/web-push-libs/vapid/tree/master/python) for more details). If `aud` is not specified,
@@ -120,7 +120,7 @@ can pass just `wp = WebPusher(subscription_info)`. This will return a `WebPusher
120120

121121
The following methods are available:
122122

123-
#### `.send(data, headers={}, ttl=0, gcm_key="", reg_id="", content_encoding="aesgcm", curl=False, timeout=None)`
123+
#### `.send(data, headers={}, ttl=0, gcm_key="", reg_id="", content_encoding="aes128gcm", curl=False, timeout=None)`
124124

125125
Send the data using additional parameters. On error, returns a `WebPushException`
126126

@@ -137,7 +137,7 @@ Developer Console.
137137

138138
*reg_id* Google Cloud Messaging registration ID (will be extracted from endpoint if not specified)
139139

140-
*content_encoding* ECE content encoding type (defaults to "aesgcm")
140+
*content_encoding* ECE content encoding type (defaults to "aes128gcm")
141141

142142
*curl* Do not execute the POST, but return as a `curl` command. This will write the encrypted content to a local file
143143
named `encrpypted.data`. This command is meant to be used for debugging purposes.
@@ -153,15 +153,15 @@ to send from Chrome using the old GCM mode:
153153
WebPusher(subscription_info).send(data, headers, ttl, gcm_key)
154154
```
155155

156-
#### `.encode(data, content_encoding="aesgcm")`
156+
#### `.encode(data, content_encoding="aes128gcm")`
157157

158158
Encode the `data` for future use. On error, returns a `WebPushException`
159159

160160
**Parameters**
161161

162162
*data* Binary string of data to send
163163

164-
*content_encoding* ECE content encoding type (defaults to "aesgcm")
164+
*content_encoding* ECE content encoding type (defaults to "aes128gcm")
165165

166166
**Example**
167167

README.rst

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,9 @@ etc), but be sure that your receiving application is able to parse and
6666
understand it. (e.g. ``data = "Mary had a little lamb."``)
6767

6868
*content\_type* - specifies the form of Encryption to use, either
69-
``'aesgcm'`` or the newer ``'aes128gcm'``. NOTE that not all User Agents
70-
can decrypt ``'aes128gcm'``, so the library defaults to the older form.
69+
``'aes128gcm'`` or the deprecated ``'aesgcm'``. NOTE that not all User
70+
Agents can decrypt ``'aesgcm'``, so the library defaults to the RFC 8188
71+
standard form.
7172

7273
*vapid\_claims* - a ``dict`` containing the VAPID claims required for
7374
authorization (See
@@ -129,8 +130,8 @@ object.
129130

130131
The following methods are available:
131132

132-
``.send(data, headers={}, ttl=0, gcm_key="", reg_id="", content_encoding="aesgcm", curl=False, timeout=None)``
133-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
133+
``.send(data, headers={}, ttl=0, gcm_key="", reg_id="", content_encoding="aes128gcm", curl=False, timeout=None)``
134+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
134135

135136
Send the data using additional parameters. On error, returns a
136137
``WebPushException``
@@ -150,7 +151,7 @@ system) This is the API key obtained from the Google Developer Console.
150151
*reg\_id* Google Cloud Messaging registration ID (will be extracted from
151152
endpoint if not specified)
152153

153-
*content\_encoding* ECE content encoding type (defaults to "aesgcm")
154+
*content\_encoding* ECE content encoding type (defaults to "aes128gcm")
154155

155156
*curl* Do not execute the POST, but return as a ``curl`` command. This
156157
will write the encrypted content to a local file named
@@ -168,8 +169,8 @@ to send from Chrome using the old GCM mode:
168169
169170
WebPusher(subscription_info).send(data, headers, ttl, gcm_key)
170171
171-
``.encode(data, content_encoding="aesgcm")``
172-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
172+
``.encode(data, content_encoding="aes128gcm")``
173+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
173174

174175
Encode the ``data`` for future use. On error, returns a
175176
``WebPushException``
@@ -178,7 +179,7 @@ Encode the ``data`` for future use. On error, returns a
178179

179180
*data* Binary string of data to send
180181

181-
*content\_encoding* ECE content encoding type (defaults to "aesgcm")
182+
*content\_encoding* ECE content encoding type (defaults to "aes128gcm")
182183

183184
**Example**
184185

0 commit comments

Comments
 (0)