Język

KeyProtection.Builder.SetBlockModes(String[]) Method

Definition

Sets the set of block modes (e.g., GCM, CBC) with which the key can be used when encrypting/decrypting.

[Android.Runtime.Register("setBlockModes", "([Ljava/lang/String;)Landroid/security/keystore/KeyProtection$Builder;", "", ApiSince=23)]
public Android.Security.Keystore.KeyProtection.Builder SetBlockModes(params string[]? blockModes);
[<Android.Runtime.Register("setBlockModes", "([Ljava/lang/String;)Landroid/security/keystore/KeyProtection$Builder;", "", ApiSince=23)>]
member this.SetBlockModes : string[] -> Android.Security.Keystore.KeyProtection.Builder

Parameters

blockModes
String[]

Value is one of the following: KeyProperties.BLOCK_MODE_ECB; KeyProperties.BLOCK_MODE_CBC; KeyProperties.BLOCK_MODE_CTR; KeyProperties.BLOCK_MODE_GCM

Returns

Attributes

Remarks

Sets the set of block modes (e.g., GCM, CBC) with which the key can be used when encrypting/decrypting. Attempts to use the key with any other block modes will be rejected.

This must be specified for symmetric encryption/decryption keys.

See KeyProperties.BLOCK_MODE constants.

Android reference for android.security.keystore.KeyProtection.Builder.setBlockModes.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to