Add field getters to DigestSpec.
Convert CodecSpec to class for consistency.