public static byte [ ] sign ( Signature signatureAlgorithm , PrivateKey privateKey , byte [ ] contentBytes ) throws InvalidKeyException , SignatureException { signatureAlgorithm . initSign ( privateKey ) ; signatureAlgorithm . update ( contentBytes ) ; return signatureAlgorithm . sign ( ) ; }
Signs content using a private key .