aerogear/aerogear-js — pull request #76 by abstractj (2013-11-08 07:07:37+00:00)
Title: Implicit IVs

Good morning sunshine! This PR will add the implicit IVs make the developer's live simple, I guess

I would like to send a separated PR to remove encoders and make it implicit too. The idea is to make utf8String encoder the default so my solo idea is:

- Before:

var options = {
IV: hex.toBits( BOB_IV ),
AAD: hex.toBits( BOB_AAD ),
key: rawPassword,
data: utf8String.toBits( PLAIN_TEXT )
};

- After (defaults to utf8String):

var options = {
IV: BOB_IV,
AAD: BOB_AAD,
key: rawPassword,
data: PLAIN_TEXT
};

If for some reason developers are willing to use Hex codec, my proposal is:

var options = {
IV: BOB_IV,
AAD: BOB_AAD,
key: rawPassword,
data: PLAIN_TEXT,
codec: sjcl.codec.hex
};