Package org.robovm.apple.security
Class SecKey
java.lang.Object
org.robovm.rt.bro.NativeObject
org.robovm.apple.corefoundation.CFType
org.robovm.apple.security.SecKey
- All Implemented Interfaces:
AutoCloseable
public class SecKey extends CFType
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSecKey.SecKeyPtrNested classes/interfaces inherited from class org.robovm.apple.corefoundation.CFType
CFType.AsListMarshaler, CFType.CFTypePtr, CFType.Marshaler, CFType.NoRetainMarshaler -
Constructor Summary
Constructors Modifier Constructor Description protectedSecKey() -
Method Summary
Modifier and Type Method Description NSDictionarycopyAttributes()NSDatacopyExternalRepresentation()NSDatacopyKeyExchangeResult(String algorithm, SecKey publicKey, NSDictionary parameters)SecKeycopyPublicKey()NSDatacreateDecryptedData(String algorithm, NSData ciphertext)NSDatacreateEncryptedData(String algorithm, NSData plaintext)static SecKeycreateRandomKey(NSDictionary parameters)NSDatacreateSignature(String algorithm, NSData dataToSign)static SecKeycreateWithData(NSData keyData, NSDictionary attributes)byte[]decrypt(SecPadding padding, byte[] cipherText)protected OSStatusdecrypt0(SecPadding padding, long cipherText, long cipherTextLen, BytePtr plainText, MachineSizedUIntPtr plainTextLen)Deprecated.Deprecated in iOS 15.0.byte[]encrypt(SecPadding padding, byte[] plainText)protected OSStatusencrypt0(SecPadding padding, long plainText, long plainTextLen, BytePtr cipherText, MachineSizedUIntPtr cipherTextLen)Deprecated.Deprecated in iOS 15.0.static voidgeneratePair(SecKeyParameters parameters, SecKey.SecKeyPtr publicKey, SecKey.SecKeyPtr privateKey)static voidgeneratePair(SecKeyParameters parameters, VoidBlock2<SecKey,SecKey> result)protected static OSStatusgeneratePair0(SecKeyParameters parameters, SecKey.SecKeyPtr publicKey, SecKey.SecKeyPtr privateKey)Deprecated.Deprecated in iOS 15.0.longgetBlockSize()static longgetClassTypeID()booleanisAlgorithmSupported(SecKeyOperationType operation, String algorithm)byte[]rawSign(SecPadding padding, byte[] dataToSign)protected OSStatusrawSign0(SecPadding padding, long dataToSign, long dataToSignLen, BytePtr sig, MachineSizedUIntPtr sigLen)Deprecated.Deprecated in iOS 15.0.voidrawVerify(SecPadding padding, byte[] signedData, byte[] sig)protected OSStatusrawVerify0(SecPadding padding, long signedData, long signedDataLen, long sig, long sigLen)Deprecated.Deprecated in iOS 15.0.booleanverifySignature(String algorithm, NSData signedData, NSData signature)Methods inherited from class org.robovm.apple.corefoundation.CFType
autorelease, close, dispose, dispose, doDispose, equalsTo, finalize, getAllocator, getDescription, getRetainCount, getTypeID, getTypeIDDescription, hash, makeCollectable, release, release, retain, retain, show, toString
-
Constructor Details
-
SecKey
protected SecKey()
-
-
Method Details
-
generatePair
public static void generatePair(SecKeyParameters parameters, SecKey.SecKeyPtr publicKey, SecKey.SecKeyPtr privateKey) throws OSStatusException- Throws:
OSStatusException- Since:
- Available in iOS 2.0 and later.
-
generatePair
public static void generatePair(SecKeyParameters parameters, VoidBlock2<SecKey,SecKey> result) throws OSStatusException- Throws:
OSStatusException- Since:
- Available in iOS 2.0 and later.
-
rawSign
- Throws:
OSStatusException- Since:
- Available in iOS 2.0 and later.
-
rawVerify
- Throws:
OSStatusException- Since:
- Available in iOS 2.0 and later.
-
encrypt
- Throws:
OSStatusException- Since:
- Available in iOS 2.0 and later.
-
decrypt
- Throws:
OSStatusException- Since:
- Available in iOS 2.0 and later.
-
getClassTypeID
public static long getClassTypeID() -
generatePair0
@Deprecated protected static OSStatus generatePair0(SecKeyParameters parameters, SecKey.SecKeyPtr publicKey, SecKey.SecKeyPtr privateKey)Deprecated.Deprecated in iOS 15.0. Use SecKeyCreateRandomKey -
rawSign0
@Deprecated protected OSStatus rawSign0(SecPadding padding, long dataToSign, long dataToSignLen, BytePtr sig, MachineSizedUIntPtr sigLen)Deprecated.Deprecated in iOS 15.0. Use SecKeyCreateSignature -
rawVerify0
@Deprecated protected OSStatus rawVerify0(SecPadding padding, long signedData, long signedDataLen, long sig, long sigLen)Deprecated.Deprecated in iOS 15.0. Use SecKeyVerifySignature -
encrypt0
@Deprecated protected OSStatus encrypt0(SecPadding padding, long plainText, long plainTextLen, BytePtr cipherText, MachineSizedUIntPtr cipherTextLen)Deprecated.Deprecated in iOS 15.0. Use SecKeyCreateEncryptedData -
decrypt0
@Deprecated protected OSStatus decrypt0(SecPadding padding, long cipherText, long cipherTextLen, BytePtr plainText, MachineSizedUIntPtr plainTextLen)Deprecated.Deprecated in iOS 15.0. Use SecKeyCreateDecryptedData -
createRandomKey
- Throws:
NSErrorException- Since:
- Available in iOS 10.0 and later.
-
createWithData
public static SecKey createWithData(NSData keyData, NSDictionary attributes) throws NSErrorException- Throws:
NSErrorException- Since:
- Available in iOS 10.0 and later.
-
getBlockSize
public long getBlockSize() -
copyExternalRepresentation
- Throws:
NSErrorException- Since:
- Available in iOS 10.0 and later.
-
copyAttributes
- Since:
- Available in iOS 10.0 and later.
-
copyPublicKey
- Since:
- Available in iOS 10.0 and later.
-
createSignature
- Throws:
NSErrorException- Since:
- Available in iOS 10.0 and later.
-
verifySignature
public boolean verifySignature(String algorithm, NSData signedData, NSData signature) throws NSErrorException- Throws:
NSErrorException- Since:
- Available in iOS 10.0 and later.
-
createEncryptedData
- Throws:
NSErrorException- Since:
- Available in iOS 10.0 and later.
-
createDecryptedData
- Throws:
NSErrorException- Since:
- Available in iOS 10.0 and later.
-
copyKeyExchangeResult
public NSData copyKeyExchangeResult(String algorithm, SecKey publicKey, NSDictionary parameters) throws NSErrorException- Throws:
NSErrorException- Since:
- Available in iOS 10.0 and later.
-
isAlgorithmSupported
- Since:
- Available in iOS 10.0 and later.
-