This is how to make a lock for a chest or double chest. It would work great if you had a hunger games map because then you can't break break blocks.
For the lock what you are going to need is
1 Chest (2 if you want a double chest)
6 Dirt Blocks (7if it is a double chest)
1 Hoe (Wood, stone, iron, gold, diamond, whatever you want)
Step 1: The Lock
So basically you just place a block on both sides of the chest ( Right & Left) and then place a dirt block directly above the chest (2 if it is a double chest). The chest is now locked. To unlock it just hoe the dirt block that is directly above the chest That makes the dirt block no longer a full block and it is now unlocked. To lock it again just jump on that block.
Step 2: What You Need for the Secret Chest
This chest is pretty hard to find unless you are looking for it.
What you need is
2 Chests (for every secret chest)
A oak wood floor (optional but it does make it harder to find the chest)
Step 3: The Secret Chest
So what you do is break the block you want the chest to be on and then place the chest in the hole. Then place the other chest on top of it. You can now barely if at all see the chest underneath but you can still open it by clicking the open button right below the top chest. This is how I hide my diamonds from my brothers when we play.