Transient export import functions added + test and a fix for R-MAC when the 2 keys are not the same