File: cmd_get_auth_code.go

package info (click to toggle)
golang-github-bougou-go-ipmi 0.7.8-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,880 kB
  • sloc: makefile: 38
file content (30 lines) | stat: -rw-r--r-- 861 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package ipmi

// see 22.21
//
// This command is used to send a block of data to the BMC, whereupon the BMC will
// return a hash of the data together concatenated with the internally stored password for the given channel and user
type GetAuthCodeRequest struct {
	AuthType AuthType

	ChannelNumber uint8

	UserID uint8

	// data to hash (must be 16 bytes)
	Data [16]byte
}

type GetAuthCodeResponse struct {
	CompletionCode

	// For IPMI v1.5 AuthCode Number:
	AuthCode [16]byte

	// ForIPMI v2.0 Integrity Algorithm Number
	// Resultant hash, per selected Integrity algorithm. Up to 20 bytes. An
	// implementation can elect to return a variable length field based on the size of
	// the hash for the given integrity algorithm, or can return a fixed field where the
	// hash data is followed by 00h bytes as needed to pad the data to 20 bytes.
	Hash []byte
}