Google은 흑인 공동체를 위한 인종적 평등을 추구하기 위해 노력하고 있습니다. 자세히 알아보기
컬렉션을 사용해 정리하기 내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.

암호화 - 스레드 스택

이 모듈에는 암호화 함수가 포함되어 있습니다.

요약

Typedef

otCryptoSha256Hash typedef

기능

otCryptoAesCcm(const otCryptoKey *aKey, uint8_t aTagLength, const void *aNonce, uint8_t aNonceLength, const void *aHeader, uint32_t aHeaderLength, void *aPlainText, void *aCipherText, uint32_t aLength, bool aEncrypt, void *aTag)
void
이 메서드는 AES CCM 계산을 수행합니다.
otCryptoHmacSha256(const otCryptoKey *aKey, const uint8_t *aBuf, uint16_t aBufLength, otCryptoSha256Hash *aHash)
void
이 함수는 HMAC 계산을 수행합니다.

구조체

otCryptoSha256해시

이 구조는 SHA-256 해시를 나타냅니다.

Typedef

otCryptoSha256해시

otPlatCryptoSha256Hash otCryptoSha256Hash

기능

otCryptoAesCcm

void otCryptoAesCcm(
  const otCryptoKey *aKey,
  uint8_t aTagLength,
  const void *aNonce,
  uint8_t aNonceLength,
  const void *aHeader,
  uint32_t aHeaderLength,
  void *aPlainText,
  void *aCipherText,
  uint32_t aLength,
  bool aEncrypt,
  void *aTag
)

이 메서드는 AES CCM 계산을 수행합니다.

세부정보
매개변수
[in] aKey
키에 대한 포인터입니다.
[in] aTagLength
태그의 길이(바이트)입니다.
[in] aNonce
nonce를 가리키는 포인터입니다.
[in] aNonceLength
nonce 길이(바이트)입니다.
[in] aHeader
헤더 포인터입니다.
[in] aHeaderLength
헤더의 길이(바이트)입니다.
[in,out] aPlainText
일반 텍스트에 대한 포인터입니다.
[in,out] aCipherText
암호문에 대한 포인터입니다.
[in] aLength
일반 텍스트 길이(바이트)입니다.
[in] aEncrypt
암호화 시 true, 복호화 시 false
[out] aTag
태그에 대한 포인터입니다.

otCryptoHmacSha256

void otCryptoHmacSha256(
  const otCryptoKey *aKey,
  const uint8_t *aBuf,
  uint16_t aBufLength,
  otCryptoSha256Hash *aHash
)

이 함수는 HMAC 계산을 수행합니다.

세부정보
매개변수
[in] aKey
키에 대한 포인터입니다.
[in] aBuf
입력 버퍼를 가리키는 포인터입니다.
[in] aBufLength
aBuf의 길이(바이트)입니다.
[out] aHash
otCryptoSha256Hash 구조를 가리키는 포인터로 해시 값을 출력합니다.

자료

OpenThread API 참조 주제는 GitHub에서 제공되는 소스 코드에서 시작됩니다. 자세한 내용을 알아보거나 문서에 참여하려면 리소스를 참고하세요.