NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
signing-info.cpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
#include "
signing-info.hpp
"
23
24
namespace
ndn
{
25
namespace
security {
26
27
const
Name
SigningInfo::EMPTY_NAME
;
28
const
SignatureInfo
SigningInfo::EMPTY_SIGNATURE_INFO
;
29
30
SigningInfo::SigningInfo
(
SignerType
signerType,
31
const
Name
& signerName,
32
const
SignatureInfo
& signatureInfo)
33
: m_type(signerType)
34
, m_name(signerName)
35
, m_digestAlgorithm(
DIGEST_ALGORITHM_SHA256
)
36
, m_info(signatureInfo)
37
{
38
}
39
40
void
41
SigningInfo::setSigningIdentity
(
const
Name
& identity)
42
{
43
m_type =
SIGNER_TYPE_ID
;
44
m_name = identity;
45
}
46
void
47
SigningInfo::setSigningKeyName
(
const
Name
& keyName)
48
{
49
m_type =
SIGNER_TYPE_KEY
;
50
m_name = keyName;
51
}
52
53
void
54
SigningInfo::setSigningCertName
(
const
Name
& certificateName)
55
{
56
m_type =
SIGNER_TYPE_CERT
;
57
m_name = certificateName;
58
}
59
60
void
61
SigningInfo::setSha256Signing
()
62
{
63
m_type =
SIGNER_TYPE_SHA256
;
64
m_name.
clear
();
65
}
66
67
void
68
SigningInfo::setSignatureInfo
(
const
SignatureInfo
& signatureInfo)
69
{
70
m_info = signatureInfo;
71
}
72
73
}
// namespace ndn
74
}
// namespace security
ndn::security::SigningInfo::SigningInfo
SigningInfo(SignerType signerType=SIGNER_TYPE_NULL, const Name &signerName=EMPTY_NAME, const SignatureInfo &signatureInfo=EMPTY_SIGNATURE_INFO)
Constructor.
Definition:
signing-info.cpp:30
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::SignatureInfo
Definition:
signature-info.hpp:32
ndn::security::SigningInfo::setSigningCertName
void setSigningCertName(const Name &certificateName)
Set signer as a certificate with name certificateName.
Definition:
signing-info.cpp:54
ndn::security::SigningInfo::SIGNER_TYPE_SHA256
use sha256 digest, no signer needs to be specified
Definition:
signing-info.hpp:59
ndn::DIGEST_ALGORITHM_SHA256
Definition:
security-common.hpp:58
ndn::tlv::SignatureInfo
Definition:
tlv.hpp:79
ndn::security::SigningInfo::EMPTY_NAME
static const Name EMPTY_NAME
Definition:
signing-info.hpp:157
ns3::ndn::Name
Name
Definition:
ndn-common.cpp:25
ndn::security::SigningInfo::setSigningIdentity
void setSigningIdentity(const Name &identity)
Set signer as an identity with name identity.
Definition:
signing-info.cpp:41
ndn::security::SigningInfo::setSha256Signing
void setSha256Signing()
Set Sha256 as the signing method.
Definition:
signing-info.cpp:61
ndn::security::SigningInfo::setSignatureInfo
void setSignatureInfo(const SignatureInfo &signatureInfo)
Set a semi-prepared SignatureInfo;.
Definition:
signing-info.cpp:68
ndn::Name
Name abstraction to represent an absolute name.
Definition:
name.hpp:46
ndn::security::SigningInfo::SIGNER_TYPE_CERT
signer is a certificate, use it directly
Definition:
signing-info.hpp:57
signing-info.hpp
ndn::security::SigningInfo::SignerType
SignerType
Definition:
signing-info.hpp:49
ndn::security::SigningInfo::SIGNER_TYPE_KEY
signer is a key, use its default certificate
Definition:
signing-info.hpp:55
ndn::security::SigningInfo::setSigningKeyName
void setSigningKeyName(const Name &keyName)
Set signer as a key with name keyName.
Definition:
signing-info.cpp:47
ndn::security::SigningInfo::SIGNER_TYPE_ID
signer is an identity, use its default key and default certificate
Definition:
signing-info.hpp:53
ndn::security::SigningInfo::EMPTY_SIGNATURE_INFO
static const SignatureInfo EMPTY_SIGNATURE_INFO
Definition:
signing-info.hpp:158
ndn::Name::clear
void clear()
Clear all the components.
Definition:
name.hpp:218
ndnSIM
ndn-cxx
src
security
signing-info.cpp
Generated on Tue Feb 23 2016 22:18:43 for ndnSIM by
1.8.11