Crypto README fixed

This commit is contained in:
Mari Wahl 2014-11-30 07:16:35 -05:00
parent 37cb7d0d10
commit 89c13d1dfd

View File

@ -193,38 +193,44 @@ Nzk0czAwIHRueXMgZmhidnByZWMgZWhiIHNiIGdlbmMgcWV2dWcgcnVnIGhibCBnYXJmcmVjIFYgbG9y
'oubWYf2kBq' 'oubWYf2kBq'
``` ```
#### Hexadecimal: #### Hexadecimal & ASCII:
Hex character codes are simply the hexadecimal (base 16) numbers for the ASCII character set; that is, the number-to-letter Representations which comprise virtually all computer text.
- [ASCII Conversion Table](http://defindit.com/ascii.html) - [ASCII Conversion Table](http://defindit.com/ascii.html)
- [Convert All](http://www.asciitohex.com/) - [Convert All](http://www.asciitohex.com/)
- [GREAT ASCII CHART](http://www.jimprice.com/jim-asc.shtml) - [GREAT ASCII CHART](http://www.jimprice.com/jim-asc.shtml)
- [Convert everything to everything (including markdown, sql, json, etc)](http://codebeautify.org/) - [Convert everything to everything (including markdown, sql, json, etc)](http://codebeautify.org/)
- Decimal to hex: - ASCII to hex:
```python ```python
>>> s =hex(secret) >>> s =hex(secret)
``` ```
- Hexadecimal to binary: - the inverse:
```python ```python
SECRET.decode('hex') secret2.decode('hex')
'==QcCtmMml1ViV3b' '==QcCtmMml1ViV3b'
``` ```
- you can also do from the command line:
``` ```
$ python -c 'print "2f722f6e6574736563".decode("hex")' $ python -c 'print "2f722f6e6574736563".decode("hex")'
``` ```
- Hex to ascii: - Using xxd:
Hex character codes are simply the hexadecimal (base 16) numbers for the ASCII character set; that is, the number-to-letter representations which comprise virtually all computer text.
``` ```
$ xxd -r -p <<< 2f722f6e6574736563 $ xxd -r -p <<< 2f722f6e6574736563
``` ```
### Binary
- Decimal to binary - Decimal to binary
```python ```python
@ -233,9 +239,8 @@ $ xxd -r -p <<< 2f722f6e6574736563
``` ```
#### Octal #### Octal
(or: a great way of obscurating a URL)
Example: http://017700000001 --> 127.0.0.1 Commonly used in obscuration of URLs. Example: http://017700000001 --> 127.0.0.1
## OpenSSL, Encoding and Certificates ## OpenSSL, Encoding and Certificates