added option to use encrypted blob instead of keychain