Implemented decodeSecret