A Lightweight Type System with Uniqueness and Typestates for the Java Cryptography API