Code example for PrivateKey

Methods: getAlgorithm

0
        } catch (NoSuchAlgorithmException e) {
            ; 
        } 
 
        if (signature == null) {
            Log.e(TAG, "Unsupported private key algorithm: " + privateKey.getAlgorithm());
            return null; 
        } 
 
        // Sign the message. 
        try { 
            signature.initSign(privateKey);
            signature.update(message);
            return signature.sign();
        } catch (Exception e) {
            Log.e(TAG, "Exception while signing message with " + privateKey.getAlgorithm() +
                        " private key: " + e);
            return null; 
        } 
    } 
 
Connect your IDE to all the code out there  Get Codota for Java