IoTeX client
Public Member Functions | Static Public Member Functions | List of all members
iotex::Storage Class Reference

Public Member Functions

virtual ResultCode savePrivateKey (IOTEX_STORAGE_ID_TYPE storageId, const uint8_t privateKey[IOTEX_PRIVATE_KEY_SIZE])
 Saves a private key to persistent storage. More...
 
virtual ResultCode readPrivateKey (IOTEX_STORAGE_ID_TYPE storageId, uint8_t privateKey[IOTEX_PRIVATE_KEY_SIZE])
 Read a stored private key from persistent memory. More...
 

Static Public Member Functions

static void Initialize (uint32_t storageSize)
 

Member Function Documentation

◆ readPrivateKey()

virtual ResultCode iotex::Storage::readPrivateKey ( IOTEX_STORAGE_ID_TYPE  storageId,
uint8_t  privateKey[IOTEX_PRIVATE_KEY_SIZE] 
)
virtual

Read a stored private key from persistent memory.

Parameters
storageIdThe EEPROM address in Arduino, or the file path in Linux
privateKeyA byte array where the private key will be copied
Returns
ResultCode Success or an error code

◆ savePrivateKey()

virtual ResultCode iotex::Storage::savePrivateKey ( IOTEX_STORAGE_ID_TYPE  storageId,
const uint8_t  privateKey[IOTEX_PRIVATE_KEY_SIZE] 
)
virtual

Saves a private key to persistent storage.

Parameters
storageIdThe EEPROM address in Arduino, or the file path in Linux
privateKeyThe private key to store as a byte array
Returns
ResultCode Success or an error code

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