Sloved the encrypt and decrypt problem. But did not finish all sections in function parse_metadata.