finished basic port of Stormpath signing algorithm but need to test