Ejemplo n.º 1
0
 private Response createSignResponse(byte[] signedHash) {
   Response response = new Response();
   response.setHeader(new StandardHeader());
   PayloadSignResponse payload = new PayloadSignResponse();
   payload.addSignedHash(signedHash);
   response.setPayload(payload);
   return response;
 }
Ejemplo n.º 2
0
 private Response createGenerateKeyResponse(
     byte[] encodedRandom, byte[] encodedKey, X509Certificate encodedCert)
     throws CertificateEncodingException {
   Response response = new Response();
   response.setHeader(new StandardHeader());
   PayloadGenerateU2FKeyResponse payload = new PayloadGenerateU2FKeyResponse();
   payload.setEncodedRandom(encodedRandom);
   payload.setEncodedWrappedKey(encodedKey);
   payload.setCertificate(encodedCert);
   response.setPayload(payload);
   return response;
 }