SSLEngines.ExportKeyingMaterial(SSLEngine, String, Byte[], Int32) 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.
Exports a value derived from the TLS master secret as described in RFC 5705.
[Android.Runtime.Register("exportKeyingMaterial", "(Ljavax/net/ssl/SSLEngine;Ljava/lang/String;[BI)[B", "", ApiSince=31)]
public static byte[]? ExportKeyingMaterial (Javax.Net.Ssl.SSLEngine engine, string label, byte[]? context, int length);
[<Android.Runtime.Register("exportKeyingMaterial", "(Ljavax/net/ssl/SSLEngine;Ljava/lang/String;[BI)[B", "", ApiSince=31)>]
static member ExportKeyingMaterial : Javax.Net.Ssl.SSLEngine * string * byte[] * int -> byte[]
Parameters
- engine
- SSLEngine
the engine to use for exporting keying material
- label
- String
the label to use in calculating the exported value. This must be an ASCII-only string.
- context
- Byte[]
the application-specific context value to use in calculating the
exported value. This may be null
to use no application context, which is
treated differently than an empty byte array.
- length
- Int32
the number of bytes of keying material to return.
Returns
a value of the specified length, or null
if the handshake has not yet
completed or the connection has been closed.
- Attributes
Remarks
Exports a value derived from the TLS master secret as described in RFC 5705.
A number of protocols leverage Transport Layer Security (TLS) to perform key establishment but then use some of the keying material for their own purposes.
This method allows an application to export keying material from a TLS connection. The exported material will be the same on the client and server if they pass in the same values for label
and context
. See RFC 5705 for further details.
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.