Class SecKey

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class SecKey
    extends CFType
    • Constructor Detail

      • SecKey

        protected SecKey()
    • Method Detail

      • getClassTypeID

        public static long getClassTypeID()
        Since:
        Available in iOS 2.0 and later.
      • rawSign0

        protected OSStatus rawSign0​(SecPadding padding,
                                    long dataToSign,
                                    long dataToSignLen,
                                    org.robovm.rt.bro.ptr.BytePtr sig,
                                    org.robovm.rt.bro.ptr.MachineSizedUIntPtr sigLen)
        Since:
        Available in iOS 2.0 and later.
      • rawVerify0

        protected OSStatus rawVerify0​(SecPadding padding,
                                      long signedData,
                                      long signedDataLen,
                                      long sig,
                                      long sigLen)
        Since:
        Available in iOS 2.0 and later.
      • encrypt0

        protected OSStatus encrypt0​(SecPadding padding,
                                    long plainText,
                                    long plainTextLen,
                                    org.robovm.rt.bro.ptr.BytePtr cipherText,
                                    org.robovm.rt.bro.ptr.MachineSizedUIntPtr cipherTextLen)
        Since:
        Available in iOS 2.0 and later.
      • decrypt0

        protected OSStatus decrypt0​(SecPadding padding,
                                    long cipherText,
                                    long cipherTextLen,
                                    org.robovm.rt.bro.ptr.BytePtr plainText,
                                    org.robovm.rt.bro.ptr.MachineSizedUIntPtr plainTextLen)
        Since:
        Available in iOS 2.0 and later.
      • createRandomKey

        public static SecKey createRandomKey​(NSDictionary parameters,
                                             NSError error)
        Since:
        Available in iOS 10.0 and later.
      • createWithData

        public static SecKey createWithData​(NSData keyData,
                                            NSDictionary attributes,
                                            NSError error)
        Since:
        Available in iOS 10.0 and later.
      • getBlockSize

        public long getBlockSize()
        Since:
        Available in iOS 2.0 and later.
      • copyExternalRepresentation

        public NSData copyExternalRepresentation​(NSError error)
        Since:
        Available in iOS 10.0 and later.
      • copyAttributes

        public NSDictionary copyAttributes()
        Since:
        Available in iOS 10.0 and later.
      • copyPublicKey

        public SecKey copyPublicKey()
        Since:
        Available in iOS 10.0 and later.
      • createSignature

        public NSData createSignature​(java.lang.String algorithm,
                                      NSData dataToSign,
                                      NSError error)
        Since:
        Available in iOS 10.0 and later.
      • verifySignature

        public boolean verifySignature​(java.lang.String algorithm,
                                       NSData signedData,
                                       NSData signature,
                                       NSError error)
        Since:
        Available in iOS 10.0 and later.
      • createEncryptedData

        public NSData createEncryptedData​(java.lang.String algorithm,
                                          NSData plaintext,
                                          NSError error)
        Since:
        Available in iOS 10.0 and later.
      • createDecryptedData

        public NSData createDecryptedData​(java.lang.String algorithm,
                                          NSData ciphertext,
                                          NSError error)
        Since:
        Available in iOS 10.0 and later.
      • copyKeyExchangeResult

        public NSData copyKeyExchangeResult​(java.lang.String algorithm,
                                            SecKey publicKey,
                                            NSDictionary parameters,
                                            NSError error)
        Since:
        Available in iOS 10.0 and later.
      • isAlgorithmSupported

        public boolean isAlgorithmSupported​(SecKeyOperationType operation,
                                            java.lang.String algorithm)
        Since:
        Available in iOS 10.0 and later.