RSAEncryption { public static byte[] sign(byte[] content, PrivateKey privateKey) throws CryptoException { byte[] hashed = sha256(content); return encrypt(hashed, privateKey); }  static byte[] encrypt(byte[] content, Key key); static byte[] decrypt(byte[] content, Key key); static byte[] sign(byte[] content, PrivateKey privateKey); static boolean verifySign(byte[] content, byte[] sign,
			PublicKey publicKey);  }
@Test public void testSign() throws CryptoException { KeyManager keyManager = KeyManager.getInstance(); keyManager.generateKeyPair(); byte[] content = new byte[] { 'a', 'b', 'c' }; byte[] sign = RSAEncryption.sign(content, keyManager.getPrivateKey()); assertFalse(Arrays.equals(content, sign)); assertTrue(RSAEncryption.verifySign(content, sign, keyManager.getPublicKey())); }