public final class Utilities
extends java.lang.Object
Utility class for Secure Messaging
| Modifier and Type | Method and Description |
|---|---|
static org.spongycastle.math.ec.ECPoint |
byteArrayToECPoint(byte[] byteArray,
org.spongycastle.math.ec.ECCurve curve)
Decodes an ECPoint from byte array.
|
static byte[] |
getKeyObjectEncoded(byte[] asn1Input)
Encodes an ASN1 KeyObject
|
public static org.spongycastle.math.ec.ECPoint byteArrayToECPoint(byte[] byteArray,
org.spongycastle.math.ec.ECCurve curve)
Decodes an ECPoint from byte array. Prime field p is taken from the passed curve The first byte must contain the value 0x04 (uncompressed point).
byteArray - Byte array of the form {0x04 || x-bytes [] || y byte []}curve - The curve on which the point should lie.public static byte[] getKeyObjectEncoded(byte[] asn1Input)
throws java.io.IOException
Encodes an ASN1 KeyObject
asn1Input - ASN1 Stream of the form [Application]Sequence{}java.io.IOException - if an error occurred