Extended MaximInterface
Dependents: mbed_DS28EC20_GPIO
Diff: Utilities/Ecc256.hpp
- Revision:
- 7:471901a04573
- Parent:
- 6:a8c83a2e6fa4
--- a/Utilities/Ecc256.hpp Wed Jan 23 13:11:04 2019 -0600 +++ b/Utilities/Ecc256.hpp Mon Mar 04 08:10:00 2019 -0600 @@ -169,49 +169,68 @@ /// Formatted data result. Result::const_span result() const { return result_; } + /// @name Public Key + /// @brief Public key of the device. /// @{ - /// Public key of the device. + + /// Get mutable Public Key. MaximInterface_EXPORT PublicKey::span publicKey(); + + /// Get immutable Public Key. PublicKey::const_span publicKey() const { return const_cast<CertificateData &>(*this).publicKey(); } + /// Set Public Key. CertificateData & setPublicKey(PublicKey::const_span publicKey) { copy(publicKey, this->publicKey()); return *this; } + /// @} + /// @name ROM ID + /// @brief 1-Wire ROM ID of the device. /// @{ - /// 1-Wire ROM ID of the device. + + /// Get mutable ROM ID. RomId::span romId() { return make_span(result_).subspan<romIdIdx, RomId::size>(); } + /// Get immutable ROM ID. RomId::const_span romId() const { return const_cast<CertificateData &>(*this).romId(); } + /// Set ROM ID. CertificateData & setRomId(RomId::const_span romId) { copy(romId, this->romId()); return *this; } + /// @} + /// @name MAN ID + /// @brief Manufacturer ID of the device. /// @{ - /// Manufacturer ID of the device. + + /// Get mutable MAN ID. ManId::span manId() { return make_span(result_).subspan<manIdIdx, ManId::size>(); } + /// Get immutable MAN ID. ManId::const_span manId() const { return const_cast<CertificateData &>(*this).manId(); } + /// Set MAN ID. CertificateData & setManId(ManId::const_span manId) { copy(manId, this->manId()); return *this; } + /// @} private: