We'd like to programmatically add files, I've found the mdl_files table in the database which looks to be what we'd need to populate.
Most of the fields in there look pretty easy to replicate however contenthash and pathnamehash have both been encrypted before they are added. I'm guessing this isn't just a standard md5? does anyone know how I'd replicate this?