ProtectedPasswordAclSubject *ProtectedPasswordAclSubject::Maker::make(Version, Reader &pub, Reader &priv) const { Allocator &alloc = Allocator::standard(Allocator::sensitive); const void *data; size_t length; priv.countedData(data, length); return new ProtectedPasswordAclSubject(alloc, CssmAutoData(alloc, data, length)); }
void CssmDbAttributeData::copyValues(const CssmDbAttributeData &source, Allocator &alloc) { assert(size() == 0); // must start out empty // we're too lazy to arrange for exception safety here CssmData *vector = alloc.alloc<CssmData>(source.size()); for (uint32 n = 0; n < source.size(); n++) vector[n] = CssmAutoData(alloc, source[n]).release(); // atomic set results info().format(source.info().format()); NumberOfValues = source.size(); values() = vector; }
ListElement::ListElement(Allocator &alloc, const string &s) { ElementType = CSSM_LIST_ELEMENT_DATUM; WordID = 0; Element.Word = CssmAutoData(alloc, s.data(), s.size()).release(); }
ListElement::ListElement(Allocator &alloc, const CssmData &data) { ElementType = CSSM_LIST_ELEMENT_DATUM; WordID = 0; Element.Word = CssmAutoData(alloc, data).release(); }