File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

The "Key" interface.

 
George Nowitzki
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone,
i have to implement an encoding class, and i need a class that implements the Key interface. The problem is i don't really understand what exactly are the methods of that interface supposed to do. Can someone please explain to me what is a primary key encoding format for example? For example what would getFormat return for a One-Time-Pad encryption key? Thanks in advance!
 
Campbell Ritchie
Sheriff
Pie
Posts: 47274
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

Sorry nobody seems to know the answer yet.
What is “Key”? Is it the same as this? In one of those methods, it appears simply to return the name of the algorithm, but I don’t know about the other two. I did some googling for tutorials and found several hits. I don’t know whether they are any good, but here are a few: 1 2 3.
This question is too difficult for “beginning”, so I shall try moving it to our security forum.
 
Mansukhdeep Thind
Ranch Hand
Posts: 1158
Eclipse IDE Firefox Browser Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes Campbell, I believe he is talking about the java.security.Key interface. I myself have never come across the usage of this Interface. Maybe one of the less used features.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Key class is used for for encryption, not encoding; is it the former or the latter that you want to implement? I'm asking because you use both terms.

But let's back up a bit: Why are you asking this question? Do you really need to create a class that implements Key? Or would an object suffice? If the latter, you can construct one using the SecretKeySpec class.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic