public final class SigUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static EllipticCurves.CurveType |
toCurveType(com.google.crypto.tink.proto.EllipticCurveType type)
Converts protobuf enum
EllipticCurveType to raw Java enum {code CurveType}. |
static EllipticCurves.EcdsaEncoding |
toEcdsaEncoding(com.google.crypto.tink.proto.EcdsaSignatureEncoding encoding)
Converts protobuf enum
EcdsaSignatureEncoding to raw Java enum {code
EllipticCurves.EcdsaEncoding}. |
static Enums.HashType |
toHashType(com.google.crypto.tink.proto.HashType hash)
Converts protobuf enum
HashType to raw Java enum Enums.HashType. |
static void |
validateEcdsaParams(com.google.crypto.tink.proto.EcdsaParams params)
Validates Ecdsa's parameters.
|
static void |
validateRsaSsaPkcs1Params(com.google.crypto.tink.proto.RsaSsaPkcs1Params params)
Validates RsaSsaPkcs1's parameters.
|
static void |
validateRsaSsaPssParams(com.google.crypto.tink.proto.RsaSsaPssParams params)
Validates RsaSsaPss's parameters.
|
public static void validateEcdsaParams(com.google.crypto.tink.proto.EcdsaParams params)
throws GeneralSecurityException
params - the Ecdsa's parameters protocol buffer.GeneralSecurityException - iff it's invalid.public static void validateRsaSsaPkcs1Params(com.google.crypto.tink.proto.RsaSsaPkcs1Params params)
throws GeneralSecurityException
params - the RsaSsaPkcs1Params protocol buffer.GeneralSecurityException - iff it's invalid.public static void validateRsaSsaPssParams(com.google.crypto.tink.proto.RsaSsaPssParams params)
throws GeneralSecurityException
params - the RsaSsaPssParams protocol buffer.GeneralSecurityException - iff it's invalid.public static Enums.HashType toHashType(com.google.crypto.tink.proto.HashType hash) throws GeneralSecurityException
HashType to raw Java enum Enums.HashType.GeneralSecurityException - if the HashType is not SHA256, SHA384, or SHA512.public static EllipticCurves.CurveType toCurveType(com.google.crypto.tink.proto.EllipticCurveType type) throws GeneralSecurityException
EllipticCurveType to raw Java enum {code CurveType}.GeneralSecurityExceptionpublic static EllipticCurves.EcdsaEncoding toEcdsaEncoding(com.google.crypto.tink.proto.EcdsaSignatureEncoding encoding) throws GeneralSecurityException
EcdsaSignatureEncoding to raw Java enum {code
EllipticCurves.EcdsaEncoding}.GeneralSecurityException