语言

KeyGenParameterSpec.Builder.SetBlockModes(String[]) 方法

定义

设置加密/解密时可以使用密钥的块模式集(例如 GCM、CBC)。

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

参数

blockModes
String[]

值为下列值之一:KeyProperties.BLOCK_MODE_ECB;KeyProperties.BLOCK_MODE_CBC;KeyProperties.BLOCK_MODE_CTR;KeyProperties.BLOCK_MODE_GCM

返回

特性

注解

设置加密/解密时可以使用密钥的块模式集(例如 GCM、CBC)。 将拒绝将密钥用于任何其他块模式的尝试。

必须为对称加密/解密密钥指定此项。

请参阅KeyProperties.BLOCK_MODE常量。

Android 参考。android.security.keystore.KeyGenParameterSpec.Builder.setBlockModes

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于