code: def open_aes_ctr_legacy(key_service, material):
      
      key = key_service.decrypt(b64decode(material['key']))
      digest_method = material.get('digest', DEFAULT_DIGEST)
      ciphertext = b64decode(material['contents'])
      if hasattr(material['hmac'], "value"):
          hmac = codecs.decode(material['hmac'].value, "hex")
      else:
          hmac = codecs.decode(material['hmac'], "hex")
      return _open_aes_ctr(key, LEGACY_NONCE, ciphertext, hmac, digest_method).decode("utf-8")
docs: Decrypts secrets stored by `seal_aes_ctr_legacy`.
      Assumes that the plaintext is unicode (non-binary).