Added interrupted key encode and keyphrase encode.