@@ -43,7 +43,7 @@ import (
4343 "github.com/Azure/azure-sdk-for-go/sdk/azcore"
4444 "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
4545 "github.com/Azure/azure-sdk-for-go/sdk/azidentity"
46- "github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys"
46+ "github.com/Azure/azure-sdk-for-go/sdk/security/ keyvault/azkeys"
4747 "github.com/google/wire"
4848 "gocloud.dev/gcerrors"
4949 "gocloud.dev/internal/gcerr"
@@ -113,7 +113,7 @@ func (o *URLOpener) OpenKeeperURL(ctx context.Context, u *url.URL) (*secrets.Kee
113113 q := u .Query ()
114114 algorithm := q .Get ("algorithm" )
115115 if algorithm != "" {
116- o .Options .Algorithm = azkeys .JSONWebKeyEncryptionAlgorithm (algorithm )
116+ o .Options .Algorithm = azkeys .EncryptionAlgorithm (algorithm )
117117 q .Del ("algorithm" )
118118 }
119119 for param := range q {
@@ -137,7 +137,7 @@ type KeeperOptions struct {
137137 // Defaults to "RSA-OAEP-256".
138138 // See https://docs.microsoft.com/en-us/rest/api/keyvault/encrypt/encrypt#jsonwebkeyencryptionalgorithm
139139 // for more details.
140- Algorithm azkeys.JSONWebKeyEncryptionAlgorithm
140+ Algorithm azkeys.EncryptionAlgorithm
141141
142142 // EncryptOptions are passed through to Encrypt.
143143 EncryptOptions * azkeys.EncryptOptions
@@ -189,7 +189,7 @@ func openKeeper(clientMaker ClientMakerT, keyID string, opts *KeeperOptions) (*k
189189 opts = & KeeperOptions {}
190190 }
191191 if opts .Algorithm == "" {
192- opts .Algorithm = azkeys .JSONWebKeyEncryptionAlgorithmRSAOAEP256
192+ opts .Algorithm = azkeys .EncryptionAlgorithmRSAOAEP256
193193 }
194194 matches := keyIDRE .FindStringSubmatch (keyID )
195195 if len (matches ) != 3 {
@@ -218,7 +218,7 @@ func openKeeper(clientMaker ClientMakerT, keyID string, opts *KeeperOptions) (*k
218218
219219// Encrypt encrypts the plaintext into a ciphertext.
220220func (k * keeper ) Encrypt (ctx context.Context , plaintext []byte ) ([]byte , error ) {
221- keyOpsResult , err := k .client .Encrypt (ctx , k .keyName , k .keyVersion , azkeys.KeyOperationsParameters {
221+ keyOpsResult , err := k .client .Encrypt (ctx , k .keyName , k .keyVersion , azkeys.KeyOperationParameters {
222222 Algorithm : & k .options .Algorithm ,
223223 Value : plaintext ,
224224 }, k .options .EncryptOptions )
@@ -230,7 +230,7 @@ func (k *keeper) Encrypt(ctx context.Context, plaintext []byte) ([]byte, error)
230230
231231// Decrypt decrypts the ciphertext into a plaintext.
232232func (k * keeper ) Decrypt (ctx context.Context , ciphertext []byte ) ([]byte , error ) {
233- keyOpsResult , err := k .client .Decrypt (ctx , k .keyName , k .keyVersion , azkeys.KeyOperationsParameters {
233+ keyOpsResult , err := k .client .Decrypt (ctx , k .keyName , k .keyVersion , azkeys.KeyOperationParameters {
234234 Algorithm : & k .options .Algorithm ,
235235 Value : ciphertext ,
236236 }, k .options .DecryptOptions )
0 commit comments