From f28eeb2d3815044177dea3ddc5b0d068571bccf8 Mon Sep 17 00:00:00 2001 From: Sascha Spreitzer Date: Wed, 3 Jun 2015 16:01:16 +0200 Subject: [PATCH] Add documentation --- README.md | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5abd82f..bfe0419 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,33 @@ Python library to convert Windows SIDs -## TODO +## Example -* Documentation in README.md +String input +```python +import sid + +mysid = sid.sid('S-1-5-21-2127521184-1604012920-1887927527-72713') +print mysid.base64() +``` + +Output +``` +AQUAAAAAAAUVAAAAoGXPfnhLm1/nfIdwCRwBAA== +``` + +Base46 input +```python +import sid + +mysid = sid.sid('AQUAAAAAAAUVAAAAoGXPfnhLm1/nfIdwCRwBAA==', sid.SID_BASE64) +print mysid +``` + +Output +``` +S-1-5-21-2127521184-1604012920-1887927527-72713 +``` ## Changelog * 0.1