/// <summary> /// Create a SigningInfo as a copy of the given signingInfo. (This takes a /// pointer to the given signingInfo PibIdentity and PibKey without copying.) /// </summary> /// /// <param name="signingInfo">The SigningInfo to copy.</param> public SigningInfo(SigningInfo signingInfo) { this.validityPeriod_ = new ValidityPeriod(); type_ = signingInfo.type_; name_ = new Name(signingInfo.name_); identity_ = signingInfo.identity_; key_ = signingInfo.key_; digestAlgorithm_ = signingInfo.digestAlgorithm_; validityPeriod_ = new ValidityPeriod(signingInfo.validityPeriod_); }
/// <summary> /// Append the timestamp and nonce name components to the supplied name, create /// an Interest object and signs it with the KeyChain given to the constructor. /// This ensures that the timestamp is greater than the timestamp used in the /// previous call. /// </summary> /// /// <param name="name">The Name for the Interest, which is copied.</param> /// <param name="params">The signing parameters.</param> /// <param name="wireFormat"></param> /// <returns>A new command Interest object.</returns> public Interest makeCommandInterest(Name name, SigningInfo paras, WireFormat wireFormat) { // This copies the Name. Interest commandInterest = new Interest(name); prepareCommandInterestName(commandInterest, wireFormat); keyChain_.sign(commandInterest, paras, wireFormat); return(commandInterest); }
/// <summary> /// Call the main makeCommandInterest where wireFormat is /// WireFormat.getDefaultWireFormat() . /// </summary> /// public Interest makeCommandInterest(Name name, SigningInfo paras) { return(makeCommandInterest(name, paras, net.named_data.jndn.encoding.WireFormat.getDefaultWireFormat())); }