public class SigUtil extends Object
public static PublicKey toJavaKey(SigningPublicKey pk) throws GeneralSecurityException
GeneralSecurityException
public static PrivateKey toJavaKey(SigningPrivateKey pk) throws GeneralSecurityException
GeneralSecurityException
public static SigningPublicKey fromJavaKey(PublicKey pk, SigType type) throws GeneralSecurityException
pk
- JAVA key!GeneralSecurityException
public static SigningPrivateKey fromJavaKey(PrivateKey pk, SigType type) throws GeneralSecurityException
pk
- JAVA key!GeneralSecurityException
public static ECPublicKey toJavaECKey(SigningPublicKey pk) throws GeneralSecurityException
GeneralSecurityException
public static ECPrivateKey toJavaECKey(SigningPrivateKey pk) throws GeneralSecurityException
GeneralSecurityException
public static SigningPublicKey fromJavaKey(ECPublicKey pk, SigType type) throws GeneralSecurityException
GeneralSecurityException
public static SigningPrivateKey fromJavaKey(ECPrivateKey pk, SigType type) throws GeneralSecurityException
GeneralSecurityException
public static EdDSAPublicKey toJavaEdDSAKey(SigningPublicKey pk) throws GeneralSecurityException
GeneralSecurityException
public static EdDSAPrivateKey toJavaEdDSAKey(SigningPrivateKey pk) throws GeneralSecurityException
GeneralSecurityException
public static SigningPublicKey fromJavaKey(EdDSAPublicKey pk, SigType type) throws GeneralSecurityException
GeneralSecurityException
public static SigningPrivateKey fromJavaKey(EdDSAPrivateKey pk, SigType type) throws GeneralSecurityException
GeneralSecurityException
public static DSAPublicKey toJavaDSAKey(SigningPublicKey pk) throws GeneralSecurityException
GeneralSecurityException
public static DSAPrivateKey toJavaDSAKey(SigningPrivateKey pk) throws GeneralSecurityException
GeneralSecurityException
public static SigningPublicKey fromJavaKey(DSAPublicKey pk) throws GeneralSecurityException
GeneralSecurityException
public static SigningPrivateKey fromJavaKey(DSAPrivateKey pk) throws GeneralSecurityException
GeneralSecurityException
public static RSAPublicKey toJavaRSAKey(SigningPublicKey pk) throws GeneralSecurityException
GeneralSecurityException
public static RSAPrivateKey toJavaRSAKey(SigningPrivateKey pk) throws GeneralSecurityException
GeneralSecurityException
public static SigningPublicKey fromJavaKey(RSAPublicKey pk, SigType type) throws GeneralSecurityException
GeneralSecurityException
public static SigningPrivateKey fromJavaKey(RSAPrivateKey pk, SigType type) throws GeneralSecurityException
GeneralSecurityException
public static byte[] toJavaSig(Signature sig)
public static Signature fromJavaSig(byte[] asn, SigType type) throws SignatureException
asn
- ASN.1 representationSignatureException
public static PublicKey importJavaPublicKey(File file, SigType type) throws GeneralSecurityException, IOException
GeneralSecurityException
IOException
public static PrivateKey importJavaPrivateKey(File file, SigType type) throws GeneralSecurityException, IOException
GeneralSecurityException
IOException
public static byte[] rectify(BigInteger bi, int len) throws InvalidKeyException
bi
- non-negativeInvalidKeyException
public static void clearCaches()