code: public static byte[] sha1(byte[] input) {
          MessageDigest messageDigest = sha1Digest.get();
  
          if (messageDigest == null) {
              try {
                  messageDigest = MessageDigest.getInstance("SHA1");
                  sha1Digest.set(messageDigest);
              } catch (NoSuchAlgorithmException e) {
                  throw new UaRuntimeException(StatusCodes.Bad_InternalError, e);
              }
          }
  
          return messageDigest.digest(input);
      }
docs: Compute the SHA1 digest for a given input.
  
  @param input the input to compute the digest for.
  @return the SHA1 digest of {@code input}.