CertConstantUtil.SERVER_PRIV_KEY, signerInfo);
}
public void testSign() throws Exception {
byte[] payload = "hello".getBytes();
ProtocolSignature signature = signer.sign(payload);
assertEquals(SignatureAlgorithm.SHA1_RSA,
signature.getSignatureAlgorithm());
assertEquals("zBYbw+lLkXGao+LfNWbv/faS+yAlsAmUfCNqXBxeFtI=",
base64(signature.getSignerId().toByteArray()));
assertEquals("TMX5+6tJnEfso3KnbWygPfGBKXtFjRk6K/SQHyj+O5/dMuGeh5n/Da3v/" +
"Cq13LcRie18dxUWMginQUGrsgseqse5orT0C4i0P6ybSxwUZ8OfFnx3lD5K4ME" +
"ceB+yAMCsnoUZA/F52ullE/aMpv9LIFmNl4QtlvKJmF3UlJCJe/M=",
base64(signature.getSignatureBytes().toByteArray()));
}