minor cleanups

method calling order was wrong for SecretBuffer.free
differentiate between bytesize and size length checking