Changed Crypto API to allocate and return arrays
Updated to lastest specification (e.g., prepending the scheme before signing)