internal void VerifyAndExtract(PayloadSecret <TMessage> secret) { secret.theParams = RawVerifyAndExtract(secret.secretValue); // This currently can't be called from SVX methods, so we don't // actually have to do the vProgram-specific stuff. //// Maybe non-nullness of the root message is as much as we can say in general? //VProgram_API.Assert(secret.theParams != null); //VProgram_API.Assert(secret.secretValue != null); //VProgram_API.AssumeValidSecret(secret.secretValue, GetReaders(secret.theParams)); }
// To prevent a secret value from being leaked by passing it to a // PayloadSecretGenerator for the wrong secret format, which thinks the // secret part is a public part and extracts it, these methods are // restricted to be called only via a MessageStructure on import. TBD // what to do if this doesn't end up meeting our needs. internal void ExtractUnverified(PayloadSecret <TMessage> secret) { secret.theParams = RawExtractUnverified(secret.secretValue); VProgram_API.Assert(secret.theParams != null); }