I'm trying to find the length of a DSA public key but it can't find the method .length
, I've made sure I have the right imports but it doesn't seem to work. The snippet is below, is there a special function to find this?
//my imports
import java.util.*;
import java.io.*;
import javax.crypto.*;
import javax.crypto.spec.*;
import java.security.*;
public boolean SelObj(int k, PublicKey c) throws java.rmi.RemoteException{
for(int j =1; j<c.bitLength(); ++j) {
//some code
}
}
The bit length of the byte array encoding:
The bit length of the integer value: