Keypop Calypso Crypto Legacy SAM C++ API 0.6.0
Reference Calypso Crypto Legacy SAM API for C++
Public Member Functions | List of all members
keypop::calypso::crypto::legacysam::transaction::SignatureComputationData< T > Class Template Referenceabstract

#include <SignatureComputationData.hpp>

Public Member Functions

virtual T & setData (const std::vector< uint8_t > &data, const uint8_t kif, const uint8_t kvc)=0
 
virtual T & setSignatureSize (const int size)=0
 
virtual T & setKeyDiversifier (const std::vector< uint8_t > &diversifier)=0
 
const std::vector< uint8_t > & getSignature () const =0
 

Detailed Description

template<typename T>
class keypop::calypso::crypto::legacysam::transaction::SignatureComputationData< T >

Contains the input/output data of the FreeTransactionManager#prepareComputeSignature(SignatureComputationData) method for common signature computation modes.

Parameters
<T>The type of the lowest level child object.
Since
0.1.0

Definition at line 30 of file SignatureComputationData.hpp.

Member Function Documentation

◆ getSignature()

template<typename T >
const std::vector< uint8_t > & keypop::calypso::crypto::legacysam::transaction::SignatureComputationData< T >::getSignature ( ) const
pure virtual

Returns the computed signature.

Returns
A byte array of 1 to 8 bytes.
Exceptions
IllegalStateExceptionIf the command has not yet been processed.
Since
0.1.0

◆ setData()

template<typename T >
virtual T & keypop::calypso::crypto::legacysam::transaction::SignatureComputationData< T >::setData ( const std::vector< uint8_t > &  data,
const uint8_t  kif,
const uint8_t  kvc 
)
pure virtual

Sets the data to be signed and the KIF/KVC of the key to be used for the signature computation.

Parameters
dataThe data to be signed.
kifThe KIF of the key to be used for the signature computation.
kvcThe KVC of the key to be used for the signature computation.
Returns
The current instance.
Since
0.1.0

◆ setKeyDiversifier()

template<typename T >
virtual T & keypop::calypso::crypto::legacysam::transaction::SignatureComputationData< T >::setKeyDiversifier ( const std::vector< uint8_t > &  diversifier)
pure virtual

Sets a specific key diversifier to use before signing (optional).

By default, the key diversification is performed with the full serial number of the target card or SAM depending on the transaction context (Card or SAM transaction).

Parameters
diversifierThe diversifier to be used (from 1 to 8 bytes long).
Returns
The current instance.
Since
0.1.0

◆ setSignatureSize()

template<typename T >
virtual T & keypop::calypso::crypto::legacysam::transaction::SignatureComputationData< T >::setSignatureSize ( const int  size)
pure virtual

Sets the expected size of the signature in bytes, which can be between 1 and 8 bytes (optional).

By default, the signature will be generated on 8 bytes.

Note: the longer the signature, the more secure it is.

Parameters
sizeThe expected size [1..8]
Returns
The current instance.
Since
0.1.0

The documentation for this class was generated from the following file: