bool OTEnvelope::Seal(const OTAsymmetricKey& RecipPubKey, const String& theInput) { mapOfAsymmetricKeys theKeys; theKeys.insert(std::pair<std::string, OTAsymmetricKey*>( "", // Normally the NymID goes here, but we don't know what it is, in // this case. const_cast<OTAsymmetricKey*>(&RecipPubKey))); return Seal(theKeys, theInput); }
bool OTEnvelope::Seal(const Nym& theRecipient, const String& theInput) { String strNymID; mapOfAsymmetricKeys theKeys; theRecipient.GetIdentifier(strNymID); theKeys.insert(std::pair<std::string, OTAsymmetricKey*>( strNymID.Get(), const_cast<OTAsymmetricKey*>(&(theRecipient.GetPublicEncrKey())))); return Seal(theKeys, theInput); }
void SoundFX::Update(float /*dt*/, int timestamp) { if (Seal(timestamp)) return; StoppedSoundCollection temporaryStoppedSounds; { BBAutoLock(stoppedSoundsLock); temporaryStoppedSounds.swap(stoppedSounds); } for (StoppedSoundCollection::iterator it = temporaryStoppedSounds.begin(); it != temporaryStoppedSounds.end(); ++it) DropSound((*it).first, (*it).second); }
bool OTEnvelope::Seal(setOfNyms& theRecipients, const String& theInput) { mapOfAsymmetricKeys RecipPubKeys; // Loop through theRecipients, and add the public key of each one to a set // of keys. for (auto& it : theRecipients) { Nym* pNym = it; OT_ASSERT_MSG(nullptr != pNym, "OTEnvelope::Seal: Assert: nullptr pseudonym pointer."); String strNymID; pNym->GetIdentifier(strNymID); RecipPubKeys.insert(std::pair<std::string, OTAsymmetricKey*>( strNymID.Get(), const_cast<OTAsymmetricKey*>(&(pNym->GetPublicEncrKey())))); } if (RecipPubKeys.empty()) return false; return Seal(RecipPubKeys, theInput); }
// RSA / AES bool OTEnvelope::Seal(const OTPseudonym & theRecipient, const OTString & theContents) { return Seal(theRecipient.GetPublicKey(), theContents); }