• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

OpenSSL & JNI

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey guys, I need to call c crypto libraries from Java (namely blowfish, aes, des) but i cannot seem to find any help whatsoever. I just need to basically encrypt/decrypt a string(s) and compare the execution times with native java cryptoś (i know whose gonna win too but i gotta code this).

Any help would be extremely appreciated. Thank u
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Pol. Have you looked at the Java Tutorial on the Java Native Interface? It's pretty simple. You declare a class that declares a native method, generate a header file from that, then write a C DLL to implement the native method and call your crypto libraries.
 
P�l O Riain
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Have you looked at the Java Tutorial on the Java Native Interface? It's pretty simple. You declare a class that declares a native method, generate a header file from that, then write a C DLL to implement the native method and call your crypto libraries.



Yes but i was hoping for a tutorial dealing more so with cryptology. I�m also not savvy with C at all.

I�m looking through the openssl crypto dir and finding it quite difficult to figure out which source files i need/don�t need.
 
Joe Ess
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'd probably start with the OpenSSL web site. There one would expect to find documentation and mailing lists dedicated to that package.
 
I yam what I yam and that's all that I yam - the great philosopher Popeye. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic