CipherSpi.EngineWrap(IKey) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Wrap a key.
[Android.Runtime.Register("engineWrap", "(Ljava/security/Key;)[B", "GetEngineWrap_Ljava_security_Key_Handler")]
protected virtual byte[]? EngineWrap (Java.Security.IKey? key);
[<Android.Runtime.Register("engineWrap", "(Ljava/security/Key;)[B", "GetEngineWrap_Ljava_security_Key_Handler")>]
abstract member EngineWrap : Java.Security.IKey -> byte[]
override this.EngineWrap : Java.Security.IKey -> byte[]
Parameters
- key
- IKey
the key to be wrapped.
Returns
the wrapped key.
- Attributes
Exceptions
if the size of the resulting bytes is not a multiple of the cipher block size.
if this cipher instance cannot wrap this key.
Remarks
Wrap a key.
This concrete method has been added to this previously-defined abstract class. (For backwards compatibility, it cannot be abstract.) It may be overridden by a provider to wrap a key. Such an override is expected to throw an IllegalBlockSizeException or InvalidKeyException (under the specified circumstances), if the given key cannot be wrapped. If this method is not overridden, it always throws an UnsupportedOperationException.
Java documentation for javax.crypto.CipherSpi.engineWrap(java.security.Key)
.
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.