Fixed the keys to use base64 instead of hex.
Also fixed the str2ab function, which was assuming 2 bytes not one.