|
NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
|
API Documentation
|
Go to the documentation of this file.
22 #ifndef NDN_SECURITY_SIGNING_INFO_HPP
23 #define NDN_SECURITY_SIGNING_INFO_HPP
44 class Error :
public std::runtime_error
47 using std::runtime_error::runtime_error;
198 shared_ptr<transform::PrivateKey>
211 m_digestAlgorithm = algorithm;
221 return m_digestAlgorithm;
265 return !(lhs != rhs);
271 return lhs.m_type != rhs.m_type ||
272 lhs.m_name != rhs.m_name ||
273 lhs.m_digestAlgorithm != rhs.m_digestAlgorithm ||
274 lhs.m_info != rhs.m_info;
282 shared_ptr<transform::PrivateKey> m_hmacKey;
288 operator<<(std::ostream& os,
const SigningInfo& si);
293 #endif // NDN_SECURITY_SIGNING_INFO_HPP
SigningInfo(SignerType signerType=SIGNER_TYPE_NULL, const Name &signerName=getEmptyName(), const SignatureInfo &signatureInfo=getEmptySignatureInfo())
Constructor.
SigningInfo & setSigningIdentity(const Name &identity)
Set signer as an identity with name identity.
const Identity & getPibIdentity() const
Signing parameters passed to KeyChain.
static const Name & getHmacIdentity()
A localhost identity to indicate that the signature is generated using an HMAC key.
SigningInfo & setSigningHmacKey(const std::string &hmacKey)
Set signer to a base64-encoded HMAC key.
SigningInfo & setDigestAlgorithm(const DigestAlgorithm &algorithm)
Set the digest algorithm for signing operations.
Represents an absolute name.
SigningInfo & setSha256Signing()
Set SHA-256 as the signing method.
static const Name & getEmptyName()
SigningInfo & setSigningCertName(const Name &certificateName)
Set signer as a certificate with name certificateName.
@ SIGNER_TYPE_ID
Signer is an identity, use its default key and default certificate.
SigningInfo & setPibIdentity(const Identity &identity)
Set signer as a PIB identity handler identity.
std::ostream & operator<<(std::ostream &os, const SigningInfo &si)
Represents a SignatureInfo TLV element.
@ SIGNER_TYPE_KEY
Signer is a key, use its default certificate.
SigningInfo & setSignatureInfo(const SignatureInfo &signatureInfo)
Set a semi-prepared SignatureInfo;.
friend bool operator!=(const SigningInfo &lhs, const SigningInfo &rhs)
SignerType getSignerType() const
const Key & getPibKey() const
const SignatureInfo & getSignatureInfo() const
const Name & getSignerName() const
shared_ptr< transform::PrivateKey > getHmacKey() const
A frontend handle of a key instance.
static const SignatureInfo & getEmptySignatureInfo()
friend bool operator==(const SigningInfo &lhs, const SigningInfo &rhs)
@ SIGNER_TYPE_CERT
Signer is a certificate, use it directly.
SigningInfo & setPibKey(const Key &key)
Set signer as a PIB key handler key.
@ SIGNER_TYPE_HMAC
Signer is a HMAC key.
SigningInfo & setSigningKeyName(const Name &keyName)
Set signer as a key with name keyName.
A frontend handle of an Identity.
DigestAlgorithm getDigestAlgorithm() const
static const Name & getDigestSha256Identity()
A localhost identity to indicate that the signature is generated using SHA-256.
Copyright (c) 2011-2015 Regents of the University of California.
@ SIGNER_TYPE_NULL
No signer is specified, use default setting or follow the trust schema.
@ SIGNER_TYPE_SHA256
Use a SHA-256 digest only, no signer needs to be specified.