Monday, April 18, 2011

Paper size

1pt = 1 inch (= 25.4 millimeters) / 72 = 0.35277777...

ISO A3 [Landscape] (420mm × 297mm)
1190.6pt × 841.9pt = 420.0172222...mm × 297.00361111...mm

ISO A4 [Portrait] (210mm × 297mm)
595.3pt × 841.9pt = 210.00861111...mm × 297.00361111...mm

JIS B4 [Portrait] (257mm × 364mm)
728.5pt x 1031.8pt = 256.99861111...mm × 363.9961111...mm 

JIS B3 [Landscape] (515mm × 364mm)
1459.8pt x 1031.8pt = 514.98499999...mm × 363.9961111...mm 

JIS B2 [Landscape] (728mm × 515mm)
2063.6pt x 1459.8pt = 727.99222222...mm × 514.98499999...mm

Thursday, April 7, 2011

En/Decrypt Blowfish with Zenity

Usage: As you like, Your own risk.

--

Encrypt

Requires:
Openssl, Zenity
Menu Name:
Encrypt Blowfish
Description:
Encryp Blowfish CBC - base64

#!/usr/bin/env bash

function encrypt()
{
pass=`zenity --entry --title='Encrypt Blowfish CBC - base64' \
--text='Enter Encryption Password' --hide-text --width='400'`

if [ -n "$pass" ]
then
verify=`zenity --entry --title='Verifying | Encrypt Blowfish CBC - base64' \
--text='Re-Enter Encryption Password' --hide-text --width='400'`

if [ "$pass" == "$verify" ]
then
exec openssl enc -bf -salt -e -a -k $pass
else
zenity --error --title='Verify failure' --text='bad password read'
fi
fi
}

encrypt
 
--

Decrypt

Requires:
Openssl, Zenity
Menu Name:
Decrypt Blowfish
Description:
Decrypt Blowfish CBC - base64

#!/usr/bin/env bash

exec openssl enc -bf -salt -d -a -k \
`zenity --entry --title='Decrypt Blowfish CBC - base64' \
--text='Enter Decryption Password' --hide-text --width=400`
 
--

Reference URL