IT. Expert System.

Android Reference



Class NativeCrypto

  • public final class NativeCrypto
    extends Object
    Provides the Java side of our JNI glue for OpenSSL.
    • Field Detail


        public static final int RAND_SEED_LENGTH_IN_BYTES
        See Also:
        Constant Field Values

        public static final Map<String,String> OPENSSL_TO_STANDARD_CIPHER_SUITES

        public static final Map<String,String> STANDARD_TO_OPENSSL_CIPHER_SUITES

        public static final String TLS_EMPTY_RENEGOTIATION_INFO_SCSV
        TLS_EMPTY_RENEGOTIATION_INFO_SCSV is RFC 5746's renegotiation indication signaling cipher suite value. It is not a real cipher suite. It is just an indication in the default and supported cipher suite lists indicates that the implementation supports secure renegotiation. In the RI, its presence means that the SCSV is sent in the cipher suite list to indicate secure renegotiation support and its absense means to send an empty TLS renegotiation info extension instead. However, OpenSSL doesn't provide an API to give this level of control, instead always sending the SCSV and always including the empty renegotiation info if TLS is used (as opposed to SSL). So we simply allow TLS_EMPTY_RENEGOTIATION_INFO_SCSV to be passed for compatibility as to provide the hint that we support secure renegotiation.
        See Also:
        Constant Field Values

        public static final long SSL_MODE_HANDSHAKE_CUTTHROUGH
        See Also:
        Constant Field Values

        public static final long SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION
        See Also:
        Constant Field Values

        public static final int SSL_VERIFY_FAIL_IF_NO_PEER_CERT
        See Also:
        Constant Field Values
    • Constructor Detail

      • NativeCrypto

        public NativeCrypto()
    • Method Detail

      • ENGINE_load_dynamic

        public static void ENGINE_load_dynamic()
      • ENGINE_by_id

        public static int ENGINE_by_id(String id)
      • ENGINE_add

        public static int ENGINE_add(int e)
      • ENGINE_init

        public static int ENGINE_init(int e)
      • ENGINE_finish

        public static int ENGINE_finish(int e)
      • ENGINE_free

        public static int ENGINE_free(int e)
      • ENGINE_load_private_key

        public static int ENGINE_load_private_key(int e,
                                  String key_id)
      • EVP_PKEY_new_DSA

        public static int EVP_PKEY_new_DSA(byte[] p,
                           byte[] q,
                           byte[] g,
                           byte[] pub_key,
                           byte[] priv_key)
      • EVP_PKEY_new_RSA

        public static int EVP_PKEY_new_RSA(byte[] n,
                           byte[] e,
                           byte[] d,
                           byte[] p,
                           byte[] q,
                           byte[] dmp1,
                           byte[] dmq1,
                           byte[] iqmp)
      • EVP_PKEY_size

        public static int EVP_PKEY_size(int pkey)
      • EVP_PKEY_type

        public static int EVP_PKEY_type(int pkey)
      • EVP_PKEY_free

        public static void EVP_PKEY_free(int pkey)
      • EVP_PKEY_cmp

        public static int EVP_PKEY_cmp(int pkey1,
                       int pkey2)
      • i2d_PKCS8_PRIV_KEY_INFO

        public static byte[] i2d_PKCS8_PRIV_KEY_INFO(int pkey)
      • d2i_PKCS8_PRIV_KEY_INFO

        public static int d2i_PKCS8_PRIV_KEY_INFO(byte[] data)
      • i2d_PUBKEY

        public static byte[] i2d_PUBKEY(int pkey)
      • d2i_PUBKEY

        public static int d2i_PUBKEY(byte[] data)
      • RSA_generate_key_ex

        public static int RSA_generate_key_ex(int modulusBits,
                              byte[] publicExponent)
      • RSA_size

        public static int RSA_size(int pkey)
      • RSA_private_encrypt

        public static int RSA_private_encrypt(int flen,
                              byte[] from,
                              byte[] to,
                              int pkey,
                              int padding)
      • RSA_public_encrypt

        public static int RSA_public_encrypt(int flen,
                             byte[] from,
                             byte[] to,
                             int pkey,
                             int padding)
      • get_RSA_public_params

        public static byte[][] get_RSA_public_params(int rsa)
        array of {n, e}
      • get_RSA_private_params

        public static byte[][] get_RSA_private_params(int rsa)
        array of {n, e, d, p, q, dmp1, dmq1, iqmp}
      • DSA_generate_key

        public static int DSA_generate_key(int primeBits,
                           byte[] seed,
                           byte[] g,
                           byte[] p,
                           byte[] q)
      • get_DSA_params

        public static byte[][] get_DSA_params(int dsa)
        array of {g, p, q, y(pub), x(priv)}
      • i2d_RSAPublicKey

        public static byte[] i2d_RSAPublicKey(int rsa)
      • i2d_RSAPrivateKey

        public static byte[] i2d_RSAPrivateKey(int rsa)
      • i2d_DSAPublicKey

        public static byte[] i2d_DSAPublicKey(int dsa)
      • i2d_DSAPrivateKey

        public static byte[] i2d_DSAPrivateKey(int dsa)
      • EVP_get_digestbyname

        public static int EVP_get_digestbyname(String name)
      • EVP_MD_size

        public static int EVP_MD_size(int evp_md)
      • EVP_MD_block_size

        public static int EVP_MD_block_size(int evp_md)
      • EVP_MD_CTX_destroy

        public static void EVP_MD_CTX_destroy(int ctx)
      • EVP_MD_CTX_copy

        public static int EVP_MD_CTX_copy(int ctx)
      • EVP_DigestInit

        public static int EVP_DigestInit(int evp_md)
      • EVP_DigestUpdate

        public static void EVP_DigestUpdate(int ctx,
                            byte[] buffer,
                            int offset,
                            int length)
      • EVP_DigestFinal

        public static int EVP_DigestFinal(int ctx,
                          byte[] hash,
                          int offset)
      • EVP_SignInit

        public static int EVP_SignInit(String algorithm)
      • EVP_SignUpdate

        public static void EVP_SignUpdate(int ctx,
                          byte[] buffer,
                          int offset,
                          int length)
      • EVP_SignFinal

        public static int EVP_SignFinal(int ctx,
                        byte[] signature,
                        int offset,
                        int key)
      • EVP_VerifyInit

        public static int EVP_VerifyInit(String algorithm)
      • EVP_VerifyUpdate

        public static void EVP_VerifyUpdate(int ctx,
                            byte[] buffer,
                            int offset,
                            int length)
      • EVP_VerifyFinal

        public static int EVP_VerifyFinal(int ctx,
                          byte[] signature,
                          int offset,
                          int length,
                          int key)
      • EVP_get_cipherbyname

        public static int EVP_get_cipherbyname(String string)
      • EVP_CipherInit_ex

        public static int EVP_CipherInit_ex(int cipherNid,
                            byte[] key,
                            byte[] iv,
                            boolean encrypting)
      • EVP_CipherUpdate

        public static int EVP_CipherUpdate(int ctx,
                           byte[] out,
                           int outOffset,
                           byte[] in,
                           int inOffset)
      • EVP_CipherFinal_ex

        public static int EVP_CipherFinal_ex(int ctx,
                             byte[] out,
                             int outOffset)
      • EVP_CIPHER_CTX_cleanup

        public static void EVP_CIPHER_CTX_cleanup(int ctx)
      • RAND_seed

        public static void RAND_seed(byte[] seed)
      • RAND_load_file

        public static int RAND_load_file(String filename,
                         long max_bytes)
      • RAND_bytes

        public static void RAND_bytes(byte[] output)
      • X509_NAME_hash

        public static int X509_NAME_hash(X500Principal principal)
      • X509_NAME_hash_old

        public static int X509_NAME_hash_old(X500Principal principal)
      • SSL_CTX_new

        public static int SSL_CTX_new()
      • getDefaultCipherSuites

        public static String[] getDefaultCipherSuites()
      • getSupportedCipherSuites

        public static String[] getSupportedCipherSuites()
      • SSL_CTX_free

        public static void SSL_CTX_free(int ssl_ctx)
      • SSL_CTX_set_session_id_context

        public static void SSL_CTX_set_session_id_context(int ssl_ctx,
                                          byte[] sid_ctx)
      • SSL_use_certificate

        public static void SSL_use_certificate(int ssl,
                               byte[][] asn1DerEncodedCertificateChain)
      • SSL_use_OpenSSL_PrivateKey

        public static void SSL_use_OpenSSL_PrivateKey(int ssl,
                                      int pkey)
      • SSL_use_PrivateKey

        public static void SSL_use_PrivateKey(int ssl,
                              byte[] pkcs8EncodedPrivateKey)
      • SSL_set_client_CA_list

        public static void SSL_set_client_CA_list(int ssl,
                                  byte[][] asn1DerEncodedX500Principals)
      • SSL_get_mode

        public static long SSL_get_mode(int ssl)
      • SSL_set_mode

        public static long SSL_set_mode(int ssl,
                        long mode)
      • SSL_clear_mode

        public static long SSL_clear_mode(int ssl,
                          long mode)
      • SSL_get_options

        public static long SSL_get_options(int ssl)
      • SSL_set_options

        public static long SSL_set_options(int ssl,
                           long options)
      • SSL_clear_options

        public static long SSL_clear_options(int ssl,
                             long options)
      • getDefaultProtocols

        public static String[] getDefaultProtocols()
      • getSupportedProtocols

        public static String[] getSupportedProtocols()
      • setEnabledProtocols

        public static void setEnabledProtocols(int ssl,
                               String[] protocols)
      • checkEnabledProtocols

        public static String[] checkEnabledProtocols(String[] protocols)
      • SSL_set_cipher_lists

        public static void SSL_set_cipher_lists(int ssl,
                                String[] ciphers)
      • setEnabledCipherSuites

        public static void setEnabledCipherSuites(int ssl,
                                  String[] cipherSuites)
      • checkEnabledCipherSuites

        public static String[] checkEnabledCipherSuites(String[] cipherSuites)
      • SSL_set_verify

        public static void SSL_set_verify(int sslNativePointer,
                          int mode)
      • SSL_set_session

        public static void SSL_set_session(int sslNativePointer,
                           int sslSessionNativePointer)
                                    throws SSLException
      • SSL_set_session_creation_enabled

        public static void SSL_set_session_creation_enabled(int sslNativePointer,
                                            boolean creationEnabled)
                                                     throws SSLException
      • SSL_set_tlsext_host_name

        public static void SSL_set_tlsext_host_name(int sslNativePointer,
                                    String hostname)
                                             throws SSLException
      • SSL_get_servername

        public static String SSL_get_servername(int sslNativePointer)
      • SSL_CTX_disable_npn

        public static void SSL_CTX_disable_npn(int sslCtxNativePointer)
        Disables NPN for all SSL connections in the context.
      • SSL_get_npn_negotiated_protocol

        public static byte[] SSL_get_npn_negotiated_protocol(int sslNativePointer)
      • SSL_renegotiate

        public static void SSL_renegotiate(int sslNativePointer)
                                    throws SSLException
        Currently only intended for forcing renegotiation for testing. Not used within OpenSSLSocketImpl.
      • SSL_get_certificate

        public static byte[][] SSL_get_certificate(int sslNativePointer)
        Returns the local ASN.1 DER encoded X509 certificates.
      • SSL_get_peer_cert_chain

        public static byte[][] SSL_get_peer_cert_chain(int sslNativePointer)
        Returns the peer ASN.1 DER encoded X509 certificates.
      • SSL_interrupt

        public static void SSL_interrupt(int sslNativePointer)
      • SSL_free

        public static void SSL_free(int sslNativePointer)
      • SSL_SESSION_session_id

        public static byte[] SSL_SESSION_session_id(int sslSessionNativePointer)
      • SSL_SESSION_get_time

        public static long SSL_SESSION_get_time(int sslSessionNativePointer)
      • SSL_SESSION_get_version

        public static String SSL_SESSION_get_version(int sslSessionNativePointer)
      • SSL_SESSION_cipher

        public static String SSL_SESSION_cipher(int sslSessionNativePointer)
      • SSL_SESSION_free

        public static void SSL_SESSION_free(int sslSessionNativePointer)
      • i2d_SSL_SESSION

        public static byte[] i2d_SSL_SESSION(int sslSessionNativePointer)
      • d2i_SSL_SESSION

        public static int d2i_SSL_SESSION(byte[] data)


Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)





Java Script








Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 4656 / 158708167. Delta: 0.01569 с