class SHA1

Declaration

class SHA1 { /* full declaration omitted */ };

Description

A class that wrap the SHA1 algorithm.

Declared at: llvm/include/llvm/Support/SHA1.h:28

Method Overview

  • public SHA1()
  • public llvm::StringRef final()
  • public static std::array<uint8_t, 20> hash(ArrayRef<uint8_t> Data)
  • public void init()
  • public llvm::StringRef result()
  • public void update(ArrayRef<uint8_t> Data)
  • public void update(llvm::StringRef Str)

Methods

SHA1()

Declared at: llvm/include/llvm/Support/SHA1.h:30

llvm::StringRef final()

Description

Return a reference to the current raw 160-bits SHA1 for the digested data since the last call to init(). This call will add data to the internal state and as such is not suited for getting an intermediate result (see result()).

Declared at: llvm/include/llvm/Support/SHA1.h:48

static std::array<uint8_t, 20> hash(
    ArrayRef<uint8_t> Data)

Description

Returns a raw 160-bit SHA1 hash for the given data.

Declared at: llvm/include/llvm/Support/SHA1.h:57

Parameters

ArrayRef<uint8_t> Data

void init()

Description

Reinitialize the internal state

Declared at: llvm/include/llvm/Support/SHA1.h:33

llvm::StringRef result()

Description

Return a reference to the current raw 160-bits SHA1 for the digested data since the last call to init(). This is suitable for getting the SHA1 at any time without invalidating the internal state so that more calls can be made into update.

Declared at: llvm/include/llvm/Support/SHA1.h:54

void update(ArrayRef<uint8_t> Data)

Description

Digest more data.

Declared at: llvm/include/llvm/Support/SHA1.h:36

Parameters

ArrayRef<uint8_t> Data

void update(llvm::StringRef Str)

Description

Digest more data.

Declared at: llvm/include/llvm/Support/SHA1.h:39

Parameters

llvm::StringRef Str