Kaydet (Commit) a861d552 authored tarafından Guido van Rossum's avatar Guido van Rossum

Document that the key should not contain null bytes.

üst db9198a8
...@@ -29,7 +29,8 @@ The available functions in this module are: ...@@ -29,7 +29,8 @@ The available functions in this module are:
\begin{funcdesc}{newrotor}{key\optional{, numrotors}} \begin{funcdesc}{newrotor}{key\optional{, numrotors}}
Return a rotor object. \var{key} is a string containing the encryption key Return a rotor object. \var{key} is a string containing the encryption key
for the object; it can contain arbitrary binary data. The key will be used for the object; it can contain arbitrary binary data but not null bytes.
The key will be used
to randomly generate the rotor permutations and their initial positions. to randomly generate the rotor permutations and their initial positions.
\var{numrotors} is the number of rotor permutations in the returned object; \var{numrotors} is the number of rotor permutations in the returned object;
if it is omitted, a default value of 6 will be used. if it is omitted, a default value of 6 will be used.
...@@ -38,7 +39,7 @@ if it is omitted, a default value of 6 will be used. ...@@ -38,7 +39,7 @@ if it is omitted, a default value of 6 will be used.
Rotor objects have the following methods: Rotor objects have the following methods:
\begin{methoddesc}[rotor]{setkey}{key} \begin{methoddesc}[rotor]{setkey}{key}
Sets the rotor's key to \var{key}. Sets the rotor's key to \var{key}. The key should not contain null bytes.
\end{methoddesc} \end{methoddesc}
\begin{methoddesc}[rotor]{encrypt}{plaintext} \begin{methoddesc}[rotor]{encrypt}{plaintext}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment