aboutsummaryrefslogtreecommitdiffstats
path: root/doc/python.tex
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-10-28 22:55:12 +0000
committerlloyd <[email protected]>2009-10-28 22:55:12 +0000
commit3623be3fd05d890309cc3da4b3a1e319e357df65 (patch)
tree34ca43fcf8a7007cc01a3919f63e9ab6763cb673 /doc/python.tex
parentfc1e61500e77fcabe67e6d2607810c1ba071bbdd (diff)
parent9462f875b13a321f42a127166d49670ca04afcde (diff)
propagate from branch 'net.randombit.botan.1_8' (head 3158f8272a3582dd44dfb771665eb71f7d005339)
to branch 'net.randombit.botan' (head bf629b13dd132b263e76a72b7eca0f7e4ab19aac)
Diffstat (limited to 'doc/python.tex')
-rw-r--r--doc/python.tex68
1 files changed, 68 insertions, 0 deletions
diff --git a/doc/python.tex b/doc/python.tex
new file mode 100644
index 000000000..afdd66b6a
--- /dev/null
+++ b/doc/python.tex
@@ -0,0 +1,68 @@
+\documentclass{article}
+
+\setlength{\textwidth}{6.5in} % 1 inch side margins
+\setlength{\textheight}{9in} % ~1 inch top and bottom margins
+
+\setlength{\headheight}{0in}
+\setlength{\topmargin}{0in}
+\setlength{\headsep}{0in}
+
+\setlength{\oddsidemargin}{0in}
+\setlength{\evensidemargin}{0in}
+
+\title{\textbf{Botan Python Interface Documentation}}
+\author{Jack Lloyd \\
+ \texttt{[email protected]}}
+\date{2009/10/10}
+
+\newcommand{\filename}[1]{\texttt{#1}}
+\newcommand{\manpage}[2]{\texttt{#1}(#2)}
+
+\newcommand{\macro}[1]{\texttt{#1}}
+
+\newcommand{\function}[1]{\textbf{#1}}
+\newcommand{\type}[1]{\texttt{#1}}
+\renewcommand{\arg}[1]{\textsl{#1}}
+\newcommand{\variable}[1]{\textsl{#1}}
+
+\begin{document}
+
+\maketitle
+
+\tableofcontents
+
+\parskip=5pt
+\pagebreak
+
+\section{Ciphers}
+
+Botan's Python interface provides a generic interface to any cipher
+supported by the library. The class \type{botan.Cipher} takes three
+arguments, all strings: first, the name of the algorith, second the
+direction (which can be either ``encrypt'' or ``decrypt''), and
+lastly, the key to use. For instance
+
+\begin{verbatim}
+ encryptor = botan.Cipher("AES-128/EAX", "encrypt", key)
+\end{verbatim}
+
+creates an object that will encrypt and authenticate messages using
+the EAX mode of operation using the AES cipher. To use this object,
+call the \function{cipher} function with two arguments - the input
+to encrypt, and the IV to use:
+
+\begin{verbatim}
+ ciphertext = encryptor.cipher(input, salt)
+\end{verbatim}
+
+
+\subsection{Cryptobox}
+
+
+\subsection{RNGs}
+
+\section{RSA}
+
+
+
+\end{document}