MCPcopy Create free account
hub / github.com/PurpleI2P/i2pd / GetCredential

Method GetCredential

libi2pd/Blinding.cpp:216–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214 }
215
216 void BlindedPublicKey::GetCredential (uint8_t * credential) const
217 {
218 // A = destination's signing public key
219 // stA = signature type of A, 2 bytes big endian
220 uint16_t stA = htobe16 (GetSigType ());
221 // stA1 = signature type of blinded A, 2 bytes big endian
222 uint16_t stA1 = htobe16 (GetBlindedSigType ());
223 // credential = H("credential", A || stA || stA1)
224 H ("credential", { {GetPublicKey (), GetPublicKeyLen ()}, {(const uint8_t *)&stA, 2}, {(const uint8_t *)&stA1, 2} }, credential);
225 }
226
227 void BlindedPublicKey::GetSubcredential (const uint8_t * blinded, size_t len, uint8_t * subcredential) const
228 {

Callers

nothing calls this directly

Calls 2

htobe16Function · 0.85
HFunction · 0.85

Tested by

no test coverage detected