Skip to content

Commit

Permalink
fix: add tweak mode to crypto key create
Browse files Browse the repository at this point in the history
Signed-off-by: Artsiom Koltun <[email protected]>
  • Loading branch information
artek-koltun committed Dec 13, 2023
1 parent f7581ff commit d47a9c5
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions spdk/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,29 @@
// Package spdk implements the spdk json-rpc protocol
package spdk

const (
// TweakModeSimpleLba represents tweak as
// Tweak[127:0] = {64'b0, LBA[63:0]}
// It is the default tweak mode if not specified
TweakModeSimpleLba = "SIMPLE_LBA"
// TweakModeJoinNegLbaWithLba represents tweak as
// Tweak[127:0] = {1’b0, ~LBA[62:0], LBA[63:0]}
TweakModeJoinNegLbaWithLba = "JOIN_NEG_LBA_WITH_LBA"
// TweakModeIncr512FullLba represents tweak as
// Tweak[127:0] = {lba[127:0]}
TweakModeIncr512FullLba = "INCR_512_FULL_LBA"
// TweakModeIncr512UpperLba represents tweak as
// Tweak[127:0] = {lba[63:0], 64'b0}
TweakModeIncr512UpperLba = "INCR_512_UPPER_LBA"
)

// AccelCryptoKeyCreateParams holds the parameters required to create a Crypto Key
type AccelCryptoKeyCreateParams struct {
Cipher string `json:"cipher"`
Key string `json:"key"`
Key2 string `json:"key2"`
Name string `json:"name"`
Cipher string `json:"cipher"`
Key string `json:"key"`
Key2 string `json:"key2"`
TweakMode string `json:"tweak_mode,omitempty"`
Name string `json:"name"`
}

// AccelCryptoKeyCreateResult is the result of creating a Crypto Key
Expand Down

0 comments on commit d47a9c5

Please sign in to comment.